Thank you Philosound.
I have now ended up with this which works perfectly when I hit the PTT.
Code:
void ts3plugin_onTalkStatusChangeEvent(uint64 serverConnectionHandlerID, int status, int isReceivedWhisper, anyID clientID) {
/*TEST INFO */
uint64 channelId = 0;
char *chpath[] = {"Air Traffic Control", "Tower", ""}; // Channel Structure
// Get the ID from the name
if (ts3Functions.getChannelIDFromChannelNames(serverConnectionHandlerID, chpath, &channelId) == ERROR_ok && channelId > 0) {
anyID myId = 0;
ts3Functions.getClientID(serverConnectionHandlerID, &myId);
if (myId > 0)
ts3Functions.requestClientMove(serverConnectionHandlerID, myId, channelId, "", NULL);
else
ts3Functions.printMessageToCurrentTab("We don't have a client ID");
} else
ts3Functions.printMessageToCurrentTab("Error getting the Channel ID");
/* TEST INFO END */
I have 2 more questions remaining before I can take this code and start to work on the flight sim side of things.
1. My flight sim code will bring the frequency in the form of Frequency = FREQ.
Can I now define FREQ somewhere so if channel name = FREQ switch channel, otherwise ignore?
2.Because I am using onTalkStatusChangeEvent I now have
<22:14:02> already member of channel
<22:14:05> already member of channel
<22:14:06> already member of channel
<22:14:06> already member of channel
<22:14:07> already member of channel
<22:14:08> already member of channel
<22:14:08> already member of channel
Everytime I press the PTT.
Is there a better event I could use which would not cause this to show up?