Group

kalle

high minded
Member of the Month
Contributor
Joined
Oct 28, 2015
Messages
312
Likes
157
Points
118
Age
23
Location
Bosnia and Herzegovina
#2
Idk if there is a better method, but with YaTQA you can hover user DB and set it to following group.


1543270802303.png

1543270834119.png

1543270863500.png

1543270889943.png
 

kalle

high minded
Member of the Month
Contributor
Joined
Oct 28, 2015
Messages
312
Likes
157
Points
118
Age
23
Location
Bosnia and Herzegovina
#4
Here you are.
PHP:
<?php
include_once('TeamSpeak3/TeamSpeak3.php');

// Connection configuration
$login_name = 'serveradmin';              // query login info
$login_password = '9kg6eRKk';             // =||=
$ip = 'localhost';                        // ex. 127.0.0.1/ 254.13.121.12
$query_port = '10011';                      // default 10011
$virtualserver_port= '9987';             // virtual server port
$group = '7';

try
{
    $ts3 = TeamSpeak3::factory("serverquery://".$login_name.":".$login_password."@".$ip.":".$query_port."/?server_port=".$virtualserver_port."&nickname=R4P3&blocking=0");
   
    // query clientlist from virtual server
    $clientList = $ts3->clientList();

    foreach ($clientList as $client) {
        if($client['client_type'] == 1) continue;
        if(!in_array($group, explode(',', $client['client_servergroups']))){
            $cldbid = $client->getInfo();
            $ts3->serverGroupClientAdd($group,$cldbid['client_database_id']);
        }  
    }
}
    catch(Exception $e)
{
  echo ($e);
}

?>
Gist:
You do not have permission to view link Log in or register now.
 
Last edited:
Joined
Dec 16, 2016
Messages
21
Likes
9
Points
38
Age
16
Location
Italy
#5
to remove the group all users just need to replace
PHP:
foreach ($clientList as $client) {
        if($client['client_type'] == 1) continue;
        if(!in_array($group, explode(',', $client['client_servergroups']))){
            $cldbid = $client->getInfo();
            $ts3->[B]serverGroupClientAdd[/B]($group,$cldbid['client_database_id']);
        }
with
PHP:
foreach ($clientList as $client) {
        if($client['client_type'] == 1) continue;
        if(!in_array($group, explode(',', $client['client_servergroups']))){
            $cldbid = $client->getInfo();
            $ts3->[B]serverGroupClientDel[/B]($group,$cldbid['client_database_id']);
        }
?
 
Joined
Dec 16, 2016
Messages
21
Likes
9
Points
38
Age
16
Location
Italy
#11
Here you are.
PHP:
<?php
include_once('TeamSpeak3/TeamSpeak3.php');

// Connection configuration
$login_name = 'serveradmin';              // query login info
$login_password = '9kg6eRKk';             // =||=
$ip = 'localhost';                        // ex. 127.0.0.1/ 254.13.121.12
$query_port = '10011';                      // default 10011
$virtualserver_port= '9987';             // virtual server port
$group = '7';

try
{
    $ts3 = TeamSpeak3::factory("serverquery://".$login_name.":".$login_password."@".$ip.":".$query_port."/?server_port=".$virtualserver_port."&nickname=R4P3&blocking=0");
  
    // query clientlist from virtual server
    $clientList = $ts3->clientList();

    foreach ($clientList as $client) {
        if($client['client_type'] == 1) continue;
        if(!in_array($group, explode(',', $client['client_servergroups']))){
            $cldbid = $client->getInfo();
            $ts3->serverGroupClientAdd($group,$cldbid['client_database_id']);
        } 
    }
}
    catch(Exception $e)
{
  echo ($e);
}

?>
Gist:
You do not have permission to view link Log in or register now.
I found a problem, if a user in the database that has the permission, the bot will block and does not assemble the servergroup another user giving as an error: duplicate entry
 

Top