Clients can be forcefully removed from a channel or the whole server. To kick a client from a channel or server call:
unsigned int ts3client_requestClientKickFromChannel( | serverConnectionHandlerID, | á |
á | clientID, | á |
á | kickReason, | á |
á | returnCode) ; | á |
uint64 serverConnectionHandlerID
;anyID clientID
;const char* kickReason
;const char* returnCode
;
unsigned int ts3client_requestClientKickFromServer( | serverConnectionHandlerID, | á |
á | clientID, | á |
á | kickReason, | á |
á | returnCode) ; | á |
uint64 serverConnectionHandlerID
;anyID clientID
;const char* kickReason
;const char* returnCode
;Parameters
serverConnectionHandlerID
Id of the target server connection.
clientID
The ID of the client to be kicked.
kickReason
A short message explaining why the client is kicked from the channel or server.
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
.
After successfully requesting a kick, one of the following events will be called:
void onClientKickFromChannelEvent( | serverConnectionHandlerID, | á |
á | clientID, | á |
á | oldChannelID, | á |
á | newChannelID, | á |
á | visibility, | á |
á | kickerID, | á |
á | kickerName, | á |
á | kickerUniqueIdentifier, | á |
á | kickMessage) ; | á |
uint64 serverConnectionHandlerID
;anyID clientID
;uint64 oldChannelID
;uint64 newChannelID
;int visibility
;anyID kickerID
;const char* kickerName
;const char* kickerUniqueIdentifier
;const char* kickMessage
;
void onClientKickFromServerEvent( | serverConnectionHandlerID, | á |
á | clientID, | á |
á | oldChannelID, | á |
á | newChannelID, | á |
á | visibility, | á |
á | kickerID, | á |
á | kickerName, | á |
á | kickerUniqueIdentifier, | á |
á | kickMessage) ; | á |
uint64 serverConnectionHandlerID
;anyID clientID
;uint64 oldChannelID
;uint64 newChannelID
;int visibility
;anyID kickerID
;const char* kickerName
;const char* kickerUniqueIdentifier
;const char* kickMessage
;Parameters
serverConnectionHandlerID
ID of the server connection handler on which the client was kicked
clientID
ID of the kicked client.
oldChannelID
ID of the channel from which the client has been kicked.
newChannelID
ID of the channel where the kicked client was moved to.
visibility
Describes if the moved client enters, retains or leaves visibility. See explanation of the enum Visibility for the function onClientMoveEvent
.
When kicked from a server, visibility can be only LEAVE_VISIBILITY
.
kickerID
ID of the client who requested the kick.
kickerName
Name of the client who requested the kick.
kickerUniqueIdentifier
Unique ID of the client who requested the kick.
kickerMessage
Message giving the reason why the client has been kicked.