OK thanks for all the help so far it is appreciated.
So far I have been able to switch to a channel ID upon entering a server.
But I haven't been able to get a channel name and switch to channel name.
The 2 codes I am using are as below.
Move to Channel Name...
Code:
void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber) {
/* Some example code following to show how to use the information query functions. */
/*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 */
and Move to channel ID...
Code:
void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber) {
/* Some example code following to show how to use the information query functions. */
/*TEST INFO */
uint64 targetChannelId = 23;
anyID myId = 0;
ts3Functions.getClientID(serverConnectionHandlerID, &myId);
if (myId > 0)
ts3Functions.requestClientMove(serverConnectionHandlerID, myId, targetChannelId, "", NULL);
else
ts3Functions.printMessageToCurrentTab("Not connected (got no client ID)");
/* TEST INFO END */
Would it also be possible to check a users channel periodically ie every second and switch them if they have moved?