Muting clients locally

## Muting clients locally

Individual clients can be locally muted. This information is handled client-side only and not visibile to other clients. 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 becomes muted, he will no longer be heard by the muter. Also the TeamSpeak 3 server will stop sending voice packets.

The mute state is not visible to the muted client nor to other clients. It is only available to the muting client by checking the `CLIENT_IS_MUTED` client property.

To mute one or more clients:

`unsigned int ts3client_requestMuteClients(` | serverConnectionHandlerID, |
| clientIDArray, |
| returnCode`)`; |

`uint64 serverConnectionHandlerID`;
`const anyID* clientIDArray`;
`const char* returnCode`;

To unmute one or more clients:

`unsigned int ts3client_requestUnmuteClients(` | serverConnectionHandlerID, |
| clientIDArray, |
| returnCode`)`; |

`uint64 serverConnectionHandlerID`;
`const anyID* clientIDArray`;
`const char* returnCode`;

Parameters

- `serverConnectionHandlerID`

  ID of the server connection handle on which the client should be locally (un)muted

- `clientIDArray`

  NULL-terminated array of client IDs.

- `returnCode`

  See return code documentation. Pass NULL if you do not need this feature.

Returns `ERROR_ok` on success, otherwise an error code as defined in `public_errors.h`.

Example to mute two clients:

    anyID clientIDArray[3];  // List of two clients plus terminating zero
    clientIDArray[0] = 123;  // First client ID to mute
    clientIDArray[1] = 456;  // Second client ID to mute
    clientIDArray[2] = 0;    // Terminating zero

    if(ts3client_requestMuteClients(scHandlerID, clientIDArray) != ERROR_ok)  /* Mute clients */
        printf("Error muting clients: %d\n", error);

To check if a client is currently muted, query the `CLIENT_IS_MUTED` client property:

    int clientIsMuted;
    if(ts3client_getClientVariableAsInt(scHandlerID, clientID, CLIENT_IS_MUTED, &clientIsMuted) != ERROR_ok)
        printf("Error querying client muted state\n);

Channel subscriptions |  | Custom encryption