Muting other clients
Individual clients can be muted by any client. It mainly serves as a sort of individual “ban” or “ignore” feature, where users can decide not to listen to certain clients anymore.
When a client gets muted, it will no longer be heard by the muter and the TeamSpeak 3 server will stop sending voice packets of the muted client.
Note
Information whether or not a client is ignored is not available to other clients, except the client that ignored them.
Mute clients
-
unsigned int ts3client_requestMuteClients(uint64 serverConnectionHandlerID, const anyID *clientIDArray, const char *returnCode)
Mute clients locally, the server will not be sending audio data for the specified clients anymore.
You will receive an onServerErrorEvent with the passed returnCode indicating whether or not the operation was successful.
See also
- Parameters:
serverConnectionHandlerID – the connection handler on which to mute the clients
clientIDArray – a zero terminated array of client ids to mute
returnCode – a c string to identify this request in callbacks. Pass an empty string if unused.
- Returns:
An Error code from the Ts3ErrorType enum indicating either success or the failure reason
Example
Example to mute two clients:
1anyID clientIDArray[3]; // List of two clients plus terminating zero
2clientIDArray[0] = 123; // First client ID to mute
3clientIDArray[1] = 456; // Second client ID to mute
4clientIDArray[2] = 0; // Terminating zero
5
6if (ts3client_requestMuteClients(scHandlerID, clientIDArray) != ERROR_ok) /* Mute clients */
7 printf("Error muting clients: %d\n", error);
Unmute clients
-
unsigned int ts3client_requestUnmuteClients(uint64 serverConnectionHandlerID, const anyID *clientIDArray, const char *returnCode)
Unmute clients locally. Server will start sending audio packets for the specified clients again.
You will receive an onServerErrorEvent with the passed returnCode indicating whether or not the operation was successful.
See also
- Parameters:
serverConnectionHandlerID – the connection handler on which to unmute the clients
clientIDArray – a zero terminated array of client ids to unmute
returnCode – a c string to identify this request in callbacks. Pass an empty string if unused.
- Returns:
An Error code from the Ts3ErrorType enum indicating either success or the failure reason
Check mute status
To check whether or not we have ignored a client check their
CLIENT_IS_MUTED
property using
ts3client_getClientVariableAsInt()
.
Example
int clientIsMuted = -1;
if (ts3client_getClientVariableAsInt(scHandlerID, clientID, CLIENT_IS_MUTED, &clientIsMuted) != ERROR_ok)
printf("Error querying client muted state\n);