A list of all virtual servers can be queried with:
unsigned int ts3server_getVirtualServerList( | result) ; |
uint64** result
;
Parameters
result
Address of a variable which receives a NULL-terminated array of server IDs. Unless an error occured, the array should be released with ts3server_freeMemory
.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
. If an error has occured, the result array is uninitialized and must not be released.
![]() | Note |
---|---|
The default virtual server has an ID of 1. |
A list of all clients currently online on the specified virtual server can be queried with:
unsigned int ts3server_getClientList( | serverID, | |
result) ; |
uint64 serverID
;anyID** result
;
Parameters
serverID
ID of the virtual server on which the client list is requested.
result
Address of a variable which receives a NULL-terminated array of client IDs. Unless an error occured, the array should be released with ts3server_freeMemory
.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
. If an error has occured, the result array is uninitialized and must not be released.
A list of all channels currently available on the specified virtual server can be queried with:
unsigned int ts3server_getChannelList( | serverID, | |
result) ; |
uint64 serverID
;uint64** result
;
Parameters
serverID
ID of the virtual server on which the channel list is requested.
result
Address of a variable which receives a NULL-terminated array of channel IDs. Unless an error occured, the array should be released with ts3server_freeMemory
.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
. If an error has occured, the result array is uninitialized and must not be released.
To get a list of all clients currently member of the specified channel:
unsigned int ts3server_getChannelClientList( | serverID, | |
channelID, | ||
result) ; |
uint64 serverID
;uint64 channelID
;anyID** result
;
Parameters
serverID
ID of the virtual server on which the list of clients is requested.
channelID
ID of the specified channel.
result
Address of a variable which receives a NULL-terminated array of client IDs. Unless an error occured, the array should be released with ts3server_freeMemory
.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
. If an error has occured, the result array is uninitialized and must not be released.
Query the channel the specified client has currently joined:
unsigned int ts3server_getChannelOfClient( | serverID, | |
clientID, | ||
result) ; |
uint64 serverID
;anyID clientID
;uint64* result
;
Parameters
serverID
ID of the virtual server on which the channel is requested.
channelID
ID of the specified client.
result
Address of a variable which receives the ID of the channel the specified client has currently joined.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
.
Get the parent channel of a given channel:
unsigned int ts3server_getParentChannelOfChannel( | serverID, | |
channelID, | ||
result) ; |
uint64 serverID
;uint64 channelID
;uint64* result
;
Parameters
serverID
ID of the virtual server on which the parent channel is requested.
channelID
ID of the channel whose parent channel is requested.
result
Address of a variable which receives the ID of the parent channel.
Returns ERROR_ok
on success, otherwise an error code as defined in public_errors.h
.
Example to print a list of all channels on a virtual server:
uint64* channels; if(ts3server_getChannelList(serverID, &channels) == ERROR_ok) { for(int i=0; channels[i] != NULL; i++) { printf("Channel ID: %u\n", channels[i]); } ts3server_freeMemory(channels); }
Example to print all clients who are member of channel with ID 123:
uint64 channelID = 123; /* ID in our example */ anyID* clients; if(ts3server_getChannelClientList(serverID, channelID, &clients) == ERROR_ok) { for(int i=0; clients[i] != NULL; i++) { printf("Client ID: %u\n", clients[i]); } ts3server_freeMemory(clients); }