Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ts3_ip = '127.0.0.1';
- $ts3_queryport = 10011;
- $ts3_port = 9987;
- $ts3_user = 'serveradmin';
- $ts3_pass = '';
- require("ts3admin.class.php");
- $tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);
- if($tsAdmin->getElement('success', $tsAdmin->connect())) {
- $tsAdmin->selectServer($ts3_port);
- $tsAdmin->login($ts3_user, $ts3_pass);
- $users = array("zvR+TNbtGHbqI7ibCkzENzXCttU=", "D8Jmx6Ym7YqG3nheOagi2VEHI24=", "u1afCoH8DCA/gQMSpQiHQtoL9+4=");
- $channels = array(143, 101, 102);
- $channelInfo = $tsAdmin->channelInfo($channels[0]);
- $client = $tsAdmin->clientGetIds($users[0]);
- $cldbid = $tsAdmin->clientGetDbIdFromUid($users[0]);
- $channelInfo3 = $tsAdmin->channelInfo($channels[1]);
- $cldbid3 = $tsAdmin->clientGetDbIdFromUid($users[1]);
- $client3 = $tsAdmin->clientGetIds($users[1]);
- $channelInfo2 = $tsAdmin->channelInfo($channels[2]);
- $cldbid2 = $tsAdmin->clientGetDbIdFromUid($users[2]);
- $client2 = $tsAdmin->clientGetIds($users[2]);
- $cldbid = $cldbid['data']['cldbid'];
- $cldbidx = $tsAdmin->clientGetNameFromDbid($cldbid);
- //--------------------------------------------------------------
- $cldbid3 = $cldbid3['data']['cldbid'];
- $cldbidx3 = $tsAdmin->clientGetNameFromDbid($cldbid3);
- if($client3['data']==null)
- {
- $status3 = "OFF";
- }else{
- foreach($client3['data'] as $clients3)
- @$clid3 = $clients3['clid'];
- $clientinfo3 = $tsAdmin->clientInfo($clid3);
- if($clientinfo3['data']['client_away']){
- $status3 = "AFK";
- }else{
- if($clientinfo3['data']['connection_bytes_sent_total'] == 0){
- $status3 = "OFF";
- }else{
- $status3 = "ON";
- }
- }
- }
- $channelEdit3 = $tsAdmin->channelEdit($channels[1], array('channel_name' => "{".$status3."}".' [Admin] '."Pacjent"));
- //--------------------------------------------------------------
- $cldbid2 = $cldbid2['data']['cldbid'];
- $cldbidx2 = $tsAdmin->clientGetNameFromDbid($cldbid2);
- if($client2['data']==null)
- {
- $status2 = "OFF";
- }else{
- foreach($client2['data'] as $clients2)
- @$clid2 = $clients2['clid'];
- $clientinfo2 = $tsAdmin->clientInfo($clid2);
- if($clientinfo2['data']['client_away']){
- $status2 = "AFK";
- }else{
- if($clientinfo2['data']['connection_bytes_sent_total'] == 0){
- $status2 = "OFF";
- }else{
- $status2 = "ON";
- }
- }
- }
- $channelEdit2 = $tsAdmin->channelEdit($channels[2], array('channel_name' => "{".$status2."}".' [Mod] '."Maciejos"));
- //--------------------------------------------------------------
- if($client['data']==null)
- {
- $status = "OFF";
- }else{
- foreach($client['data'] as $clients)
- $clid = $clients['clid'];
- @$clientinfo = $tsAdmin->clientInfo($clid);
- if($clientinfo['data']['client_away']){
- $status = "AFK";
- }else{
- if($clientinfo['data']['connection_bytes_sent_total'] == 0){
- }else{
- $status = "ON";
- }
- }
- }
- $channelEdit = $tsAdmin->channelEdit($channels[0], array('channel_name' => "{".$status."}".' [Query] '."Klitek"));
- //----------------------------POKE-------------------------------------
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement