Moving Clients to a Channel

TEAMSPEAK. YOUR VOICE. YOUR WAY.

Introduction

This article will guide you through moving a client to another channel on a TeamSpeak SDK server.

Let’s code

Topics:

  • Move Client
  • Example Code

Move Client

Clients can be moved server-side to another channel, in addition to the client-side functionality offered by the Client Lib. To move one or more clients to a new channel, call:

unsigned int ts3server_clientMove(
    uint64 serverID,
    uint64 newChannelID,
    const anyID* clientIDArray);

serverID: ID of the current virtual server on which the client should be moved.
newChannelID: ID of the channel in which the clients should be moved to.
newChannelParentID: Zero-terminated array(!) with the IDs of the clients to be moved.

Example Code

Now we’re ready to move clients to another channel on the TeamSpeak SDK Server. In this Example we will move a single client.

uint64 serverID;
int newChannelID = 2;
int clientID = 1;
anyID clientIDArray[2];
clientIDArray[0] = clientID;
clientIDArray[1] = 0;

if ((error = ts3server_clientMove(serverID, newChannelID, clientIDArray)) != ERROR_ok)
{
    printf("Error client move to Channel: %d\n", error);
}

Congratulations!

You have moved your first client on a TeamSpeak Server using the TeamSpeak SDK and have learned about moving clients.