Sending

To send a private text message to a client:

unsigned int ts3client_requestSendPrivateTextMsg(serverConnectionHandlerID,  
 message,  
 targetClientID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
anyID targetClientID;
const char* returnCode;
 

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


To send a text message to a channel:

unsigned int ts3client_requestSendChannelTextMsg(serverConnectionHandlerID,  
 message,  
 targetChannelID,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
anyID targetChannelID;
const char* returnCode;
 

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


To send a text message to the virtual server:

unsigned int ts3client_requestSendServerTextMsg(serverConnectionHandlerID,  
 message,  
 returnCode); 
uint64 serverConnectionHandlerID;
const char* message;
const char* returnCode;
 

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


Example to send a text chat to a client with ID 123:

const char *msg = "Hello TeamSpeak!";
anyID targetClientID = 123;

if(ts3client_requestSendPrivateTextMsg(scHandlerID, msg, targetClient, NULL) != ERROR_ok) {
  /* Handle error */
}