Teamspeak 3 PHP (SCP Api)

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
Hi, Any know about channelGroupList ?

I need Show only Channel Groups. But i cant find xd (Channel Admin , Operator , Guest, etc )

PHP:
$channelgroups = $ts3->channelGroupList(array("type" => TeamSpeak3::GROUP_DBTYPE_REGULAR));

But not Show Only "Channel Groups"

I do print_r to last php code and show this...

8NaTd9r.png
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
Are you trying to get the channel/server groups from an user?
Code:
$serverAdminID = 6;
$channelAdminID = 5;
foreach($ts3->clientList() as $client){
   if($client["client_type"]) continue;
   foreach (explode(",", $client["client_servergroups"]) as $userGroupServer){
     if($userGroupServer == $serverAdminID){
       //Server Administrator
     }
   }
   foreach (explode(",", $client["client_channel_group_id"]) as $userGroupChannel){
     if($userGroupChannel == $channelAdminID){
       //Channel Administrator
     }
   }
}

if not, then you need to separate the information you need from the channel's recursive result.
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
Are you trying to get the channel/server groups from an user?
Code:
$serverAdminID = 6;
$channelAdminID = 5;
foreach($ts3->clientList() as $client){
   if($client["client_type"]) continue;
   foreach (explode(",", $client["client_servergroups"]) as $userGroupServer){
     if($userGroupServer == $serverAdminID){
       //Server Administrator
     }
   }
   foreach (explode(",", $client["client_channel_group_id"]) as $userGroupChannel){
     if($userGroupChannel == $channelAdminID){
       //Channel Administrator
     }
   }
}

if not, then you need to separate the information you need from the channel's recursive result.


No i need "ChannelGroups" only.

Channel Groups: "Channel Admin" "Operator" "Voice" "Channel Comander"
Its for Generate token.

t4E6DSc.png
 
Top