Whisper lists
A client with a whisper list set can talk to the specified clients and channels. Whisper lists can be defined for individual clients. A whisper list consists of an array of client IDs and/or an array of channel IDs.
Important
Setting a whisper list will stop regular voice transmission to the current channel of the client.
Clients that have a whisper list set will only be heard by the clients specified in the whisper list.
-
unsigned int ts3client_requestClientSetWhisperList(uint64 serverConnectionHandlerID, anyID clientID, const uint64 *targetChannelIDArray, const anyID *targetClientIDArray, const char *returnCode)
Sets the client to which to transmit voice. Stops standard channel voice transmission.
The client will still receive voice from their current channel, however their voice will not be transmitted to their current channel anymore. If this call is successful (check onServerErrorEvent) then voice of the specified client will be transmitted to all specified channels and all the specified clients. Pass 0 to both target parameter arrays to restore default behavior of transmitting voice to current channel. You will receive an onServerErrorEvent with the passed returnCode indicating whether or not the operation was successful.
- Parameters:
serverConnectionHandlerID – the connection handler on which to set the whisper list
clientID – the client to set the whisper list for. Set to 0 or your own client ID to set your own whisper list.
targetChannelIDArray – a zero terminated array of channel ids to transmit voice to.
targetClientIDArray – a zero terminated array of client ids to transmit voice to.
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
To disable the whisper list for the given client, pass NULL to both
targetChannelIDArray
and targetClientIDArray
.
Caution
If you pass two empty arrays, whispering is not disabled but instead one would still be whispering to nobody (empty lists).
Control who can whisper you
To control which client is allowed to whisper to own client, the Client Lib implements an internal whisper allow list mechanism. When a client recieves a whisper while the whispering client has not yet been added to the whisper allow list, the receiving client gets the following event.
Note
Whisper voice data is not received until the sending client is added to the receivers whisper allow list.
-
struct ClientUIFunctions
Defines available callbacks that you can receive.
Set the members of this struct to a function to call when the specific event happens.
Public Members
-
void (*onIgnoredWhisperEvent)(uint64 serverConnectionHandlerID, anyID clientID)
called when someone whispers us that is not on the list of clients we accept whispers from.
See also
See also
- Param serverConnectionHandlerID:
specifies on which connection the callback was called
- Param clientID:
id of the client that tried to whisper us
-
void (*onIgnoredWhisperEvent)(uint64 serverConnectionHandlerID, anyID clientID)
Add to allow list
The receiving client can decide to allow whispering from the sender and add the sending client to the whisper allow list by calling
-
unsigned int ts3client_allowWhispersFrom(uint64 serverConnectionHandlerID, anyID clID)
Allow another client to whisper us.
Adds the specified other client on the server to whisper us. Prior to this call whispers from other clients are ignored and no audio data will be made available from whispers. Can be undone using ts3client_removeFromAllowedWhispersFrom
See also
- Parameters:
serverConnectionHandlerID – the connection handler for the server on which the client specified by clID is located.
clID – the client id of another client which we want to receive whispers from.
- Returns:
An Error code from the Ts3ErrorType enum indicating either success or the failure reason
If the sender is not added by the receiving client, this callback continues to be called but no voice data is transmitted to the receiving client.
Remove from allow list
To remove a client from the whisper allow list:
-
unsigned int ts3client_removeFromAllowedWhispersFrom(uint64 serverConnectionHandlerID, anyID clID)
Removes a client from the allowed whisper list.
Removes the specified other client on the server from the allowed whisperer list. After this call no more audio is made available when receiving whispers from the specified client. The opposite of ts3client_allowWhispersFrom
See also
See also
- Parameters:
serverConnectionHandlerID – the connection handler for the server on which the client specified by clID is located.
clID – the client id of another client which we do not want to receive whispers from anymore.
- Returns:
An Error code from the Ts3ErrorType enum indicating either success or the failure reason