Question Auto-Channel-Recreator ?

Discussion in 'Script requests' started by walross99, Jul 8, 2017.

Tags:
  1. Kieran

    Kieran Tag me Member of the Month

    Played around with it and you can set permissions using permAssign.
    Here is an example to add 999 to i_channel_needed_join_power for a channel with the ID 12.
    PHP:
    $channel $ts3->channelGetById(12);
    $channel->permAssign(137999);
    You can also do permList to see the permissions of the channel
    Here's a list of all perms (Warning! Long!):
    You need to register to view spoilers!
     
    Kleberstoff likes this.
  2. walross99

    walross99 Some random Guy VIP

    You can also just use the name ^^ Like 'i_channel_subscribe_power'
     
    Kieran likes this.
  3. Kieran

    Kieran Tag me Member of the Month

    ID is faster and shorter though so just use the list to get the ID.
     
  4. Kleberstoff

    Kleberstoff Knowledge Seeker

    Perfect, thanks. I gonna push the stuff to Github when Updated and edit THIS post when done.
     
    Kieran likes this.
  5. Kieran

    Kieran Tag me Member of the Month

    So basically my approach would be, have the people write the permission ID (or name) in an array with the power seperated by a =. You could then foreach through that and use explode to set each individual permission the user specified when a new channel is created
    for example
    PHP:
    $permissions = array(
    "137=999",
    "i_channel_needed_subscribe_power=500",
    "i_channel_needed_join_power=40"
    );
    though, I couldn't find out yet if you just have to set a permission with a tick box (for example b_client_avatar_delete_other) to 0/1 to disable/enable it. I will try it when I'm home.

    @walross99 's reply will come in handy here. It makes it more comfortable for the user because nobody wants to search for the correct ID when using this.
     
    Last edited: Jul 17, 2017
    Kleberstoff likes this.
  6. anonym

    anonym New Member

    Can you make a tutorial for the Script?
     
  7. Kleberstoff

    Kleberstoff Knowledge Seeker

    Its rather simple, simply check the config.php in the libaries folder, that should be all you need to know.

    edit: otherwise, send me a pm on the forum.
     

Share This Page