Deleting channels
A channel can be deleted by the server by calling
-
unsigned int ts3server_channelDelete(uint64 serverID, uint64 channelID, int force)
delete a channel
- Parameters:
serverID – the server on which the channel is located
channelID – the id of the channel to delete
force – boolean flag, 1 = delete even if there are clients or sub channels in the channel. 0 = fail if there are sub channels or clients in the channel or sub channels.
- Returns:
An Error code from the Ts3ErrorType enum indicating either success or the failure reason
Note
After successfully deleting a channel, the ServerLibFuntions.onChannelDeleted()
callback
is called for every deleted channel.
When specifying the force parameter as 1, all clients in this channel and all the sub channels of this channel will be kicked out of the channel first. The server will then go ahead and recursively delete all the sub channels and finally the channel specified.
Warning
The call will fail on the first channel that cannot be deleted. However some channels may have been deleted despite that.
Use the ServerLibFunctions.onChannelDeleted()
callback to know which have been deleted.