Alternative way to create channel
Quote:
Finally, after setting up channel parameters, create the channel in one step with
unsigned int ts3server_createChannel( serverID,
channelCreationParams,
flags,
result);
uint64 serverID;
struct TS3ChannelCreationParams* channelCreationParams;
enum ChannelCreateFlags flags;
uint64* result;
channelCreationParams
Address of the struct TS3ChannelCreationParams with the creation parameters for this .
flags
Defines if the channel password is passed as plaintext or already encrypted. If already encrypted, this is the password retrieved via the channel variable CHANNEL_PASSWORD, which is returned as encrypted password. In this case you would specify the password on channel creation as already encrypted to avoid it being encrypted automatically a second time.
enum ChannelCreateFlags{
CHANNEL_CREATE_FLAG_NONE = 0x000,
CHANNEL_CREATE_FLAG_PASSWORDS_ENCRYPTED = 0x001,
};
result
Address to be filled with the created channel ID.
Documentation source page
Is the return value 'result' be the channelID ?
With this way to create a channel, we have to give it a channelID :
Code:
// Set essential parameters are channel parent ID and channel ID
if (ts3server_setChannelCreationParams(*_channelCreationParams, channelParentID, channelID) != ERROR_ok) {
throw std::runtime_error("An error occured : set channel creation params failed.");
}
Can I mix the two effects by giving 0 at channelID param and after flush (and channel created) retreive the channelID given by the server.