Dalexhd

ch_usersonline.php

Oct 25th, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. include_once 'include/config.php';
  3. include_once 'include/ts3admin.class.php';
  4.  
  5. function ch_usersonline()
  6. {
  7.     global $query;
  8.     global $config;
  9.  
  10.     $serverinfo = $query->getElement('data', $query->serverInfo());
  11.     $bots = $serverinfo['virtualserver_queryclientsonline'];
  12.     $users = $serverinfo['virtualserver_clientsonline'];
  13.     $online = $users - $bots;
  14.  
  15.     $data = array();
  16.     $data['channel_name'] = str_replace('[online]',$online, $config['ch_usersonline']['name']);
  17.     $query->channelEdit($config['ch_usersonline']['cid'], $data);
  18.  
  19.     unset($query);
  20.     unset($config);
  21. }
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment