Forum

Results 1 to 7 of 7
  1. #1
    Join Date
    November 2017
    Location
    France
    Posts
    18

    Create Channel FLAG_PERMANENT and FLAG_SEMI_PERMANENT

    Hi here,
    I have some questions about channel creation, I saw :

    Code:
    /* Set data of new channel. Use channelID of 0 for creating channels. */
    CHECK_ERROR(ts3server_setChannelVariableAsString(serverID, 0, CHANNEL_NAME, name));
    CHECK_ERROR(ts3server_setChannelVariableAsString(serverID, 0, CHANNEL_TOPIC, "Test channel topic"));
    CHECK_ERROR(ts3server_setChannelVariableAsString(serverID, 0, CHANNEL_DESCRIPTION, "Test channel description"));
    CHECK_ERROR(ts3server_setChannelVariableAsInt(serverID, 0, CHANNEL_FLAG_PERMANENT, 1));
    CHECK_ERROR(ts3server_setChannelVariableAsInt(serverID, 0, CHANNEL_FLAG_SEMI_PERMANENT, 0));
    The first question is for CHANNEL_FLAG_PERMANENT and CHANNEL_FLAG_SEMI_PERMANENT, the last int in the function can only be 0 or 1 like on/off token ?
    Is it necessary to write the two lines with one at 1 and the other at 0 ? For instance if I want a permanent channel, why I can't only write
    Code:
    CHECK_ERROR(ts3server_setChannelVariableAsInt(serverID, 0, CHANNEL_FLAG_PERMANENT, 1));
    ?
    And last, but not least : if we don't set CHANNEL properties, are there some default value defined somewhere ?

    Thanks in advance for your help

  2. #2
    Join Date
    September 2012
    Posts
    6,076
    Yes you can omit the flags you don't want to set and for flags it usually is either 1 or 0 (on/off).
    Anything you don't specify will default, however you do have to set a name at the very least.

    If you don't specify either of the semi / perm flags the channel will be temporary.
    Anything else will be 0, infinite (e.g. channel limits) or not set (e.g. description) by default. The defaults cannot be changed.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    November 2017
    Location
    France
    Posts
    18
    Thanks a lot Chris.

    One last question about channel properties, I did not find it in online documentation : CHANNEL_DELETE_DELAY is int type ?

    Again, thanks for your support.
    Vincent.

  4. #4
    Join Date
    August 2013
    Location
    Germany
    Posts
    540
    I think its in seconds

  5. #5
    Join Date
    November 2017
    Location
    France
    Posts
    18
    Hi Bluscream
    Yep that says it is second but which C langage type ? Like unsigned int perhaps.

  6. #6
    Join Date
    September 2012
    Posts
    6,076
    Quote Originally Posted by Vincent_Stormancer View Post
    Thanks a lot Chris.

    One last question about channel properties, I did not find it in online documentation : CHANNEL_DELETE_DELAY is int type ?

    Again, thanks for your support.
    Vincent.
    yes that's a 64bit unsigned integer
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  7. #7
    Join Date
    November 2017
    Location
    France
    Posts
    18

    Solved

    Thanks, this post is resolved status to me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create a channel that create sup channel on join?
    By ThunderNRW in forum Server Support
    Replies: 0
    Last Post: June 1st, 2015, 10:00 PM
  2. [Not possible] Restrict server group to create sub channel in one channel only
    By MicPawnage in forum Permission System
    Replies: 4
    Last Post: August 9th, 2014, 01:43 PM
  3. Replies: 4
    Last Post: December 14th, 2013, 09:17 PM
  4. Replies: 9
    Last Post: November 27th, 2013, 09:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •