release 1.3.1
This commit is contained in:
@@ -10,23 +10,26 @@ function addon_assign_groups($addons_config,$ts3,$cfg,$dbname,$allclients,$selec
|
||||
if($client['client_unique_identifier'] == $uuid) {
|
||||
$cldbid = $client['client_database_id'];
|
||||
$nickname = htmlspecialchars($client['client_nickname'], ENT_QUOTES);
|
||||
$uid = htmlspecialchars($client['client_unique_identifier'], ENT_QUOTES);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isset($cldbid)) {
|
||||
if(strstr($group, '-')) {
|
||||
$group = str_replace('-','',$group);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->serverGroupClientDel($group, $cldbid);
|
||||
enter_logfile($cfg,6,"Removed servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
|
||||
}
|
||||
} else {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->serverGroupClientAdd($group, $cldbid);
|
||||
enter_logfile($cfg,6,"Added servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user