Celso
Well-Known Member
- Oct 1, 2017
- 142
- 47
- 119
Hello, this script has a permissible groups function, but it does not work ... it accepts all groups even by configuring the allowed groups in config.php
config.php
PHP:
try {
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$ts3_username:$ts3_password@$ts3_host:$ts3_q_port/?server_port=$ts3_s_port");
$ts3_VirtualServer->selfUpdate(array('client_nickname'=> $ts3_nick));
$client = $ts3_VirtualServer->clientGetByUid($request->uuid);
$groups = $client["client_servergroups"];
$group_matches = 0;
foreach($allowed_groups as $g)
{
$client_nickname = $client->client_nickname;
$channelname = $request->channelname;
$unixTime = time();
$realTime = date('[d-m-Y]-[H:i]',$unixTime);
if(in_array($g, $allowed_groups))
{
$group_matches++;
}
}
if($group_matches <= 0)
{
Response(403, "Não Autorizado "," Não é permitido usar esta ferramenta, você não está em um grupo permitido.");
}
config.php
PHP:
$allowed_groups = array(209,217,218,219,220,221,222,223,118,123,170,124,125,172);