Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'config.php';
- require_once 'lib/ts3admin.class.php';
- require_once 'lib/helper.php';
- $ts3_ip = $teamspeak['address'];
- $bvc = file_get_contents("http://license.gzpro.net/check.php?ip=$ts3_ip&name=BanBot");
- if ($bvc == "License: ERROR")
- {
- die();
- }
- $query = new ts3admin($teamspeak['address'], $teamspeak['tcp']);
- if($query->getElement('success', $query->connect()))
- {
- $query->login($teamspeak['login'],$teamspeak['password']);
- $query->selectServer($teamspeak['udp']);
- $query->setName("(GzPro.net)".$bot['name']);
- $core = $query->getElement('data',$query->whoAmI());
- $query->clientMove($core['client_id'],$bot['default_channel']);
- $users = $query->getElement('data',$query->clientList('-groups -voice -away -times'));
- while(1)
- {
- $users = $query->getElement('data',$query->clientList('-groups -voice -away -times'));
- foreach ($users as $client)
- {
- $info = $query->getElement('data',$query->clientInfo($client['clid']));
- $user_groups = explode(',',$client['client_servergroups']);
- if ( ($info['client_version'] != "ServerQuery") && ((isInGroup($user_groups,$ban3h))))
- {
- $query->sendMessage(1, $client['clid'], $message);
- $query->banClient($client['clid'],$time3h, $banreason3h);
- }
- if ( ($info['client_version'] != "ServerQuery") && ((isInGroup($user_groups,$ban3d))))
- {
- $query->sendMessage(1, $client['clid'], $message);
- $query->banClient($client['clid'],$time3d, $banreason3d);
- }
- if ( ($info['client_version'] != "ServerQuery") && ((isInGroup($user_groups,$ban7d))))
- {
- $query->sendMessage(1, $client['clid'], $message);
- $query->banClient($client['clid'],$time7d, $banreason7d);
- }
- if ( ($info['client_version'] != "ServerQuery") && ((isInGroup($user_groups,$ban30d))))
- {
- $query->sendMessage(1, $client['clid'], $message);
- $query->banClient($client['clid'],$time30d, $banreason30d);
- }
- if ( ($info['client_version'] != "ServerQuery") && ((isInGroup($user_groups,$banperm))))
- {
- $query->sendMessage(1, $client['clid'], $message);
- $query->banClient($client['clid'],$timeperm, $banreasonperm);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement