I use the following code to switch channels in Teamspeak and it works flawlessly.
Code:
/*Start Channel Switch */
if (NULL == hSimConnect) StartSimConnect();
uint64 channelId = 0;
snprintf(FREQ, "%3.3f", GetCom1());
char *chpath[] = {"Air Traffic Control", FREQ, ""}; // Channel Structure
anyID myId = 0;
// Get the ID from the name
if (ts3Functions.getChannelIDFromChannelNames(serverConnectionHandlerID, chpath, &channelId) == ERROR_ok && channelId > 0) {
ts3Functions.getClientID(serverConnectionHandlerID, &myId);
if (myId == clientID)
{
uint64 uiMyChannel = 0;
ts3Functions.getChannelOfClient(serverConnectionHandlerID, myId, &uiMyChannel);
if (uiMyChannel != channelId) ts3Functions.requestClientMove(serverConnectionHandlerID, myId, channelId, "", NULL);
}
}
/* End Channel Switch */
But.....
I would like to add text after the frequency which I have pulled from my program.
For instance at the moment if a channel is named "123.450" and FREQ = 123.450 I will move channels.
But if my channel is named "123.450 ATC Tower" I will not move.
I'm sure this is simple but I've tried everything I can think of and can't find the solution.
All help is appreciated.