#305 attach botcount to log instead of ts query
This commit is contained in:
parent
9f2f0c0957
commit
5544032e03
@ -1,9 +1,7 @@
|
||||
<?php
|
||||
class cron_server_bot_tbc_live implements \SYSTEM\CRON\cronjob{
|
||||
public static function run(){
|
||||
\LIB\lib_ts3::php();
|
||||
$ts3 = TeamSpeak3::factory("serverquery://mojotrollztsquery:9aYllYkG@127.0.0.1:10011/");
|
||||
$bot_count = $ts3->serverGetByPort(9987)->clientCount();
|
||||
$bot_count = \SQL\CRON_BOT_COUNT::Q1()['bot_count'];
|
||||
|
||||
$bots = \SQL\CRON_RANDOM_BOTS::QQ();
|
||||
while($bot = $bots->next()){
|
||||
|
||||
11
mojotrollz/cron/qq/CRON_BOT_COUNT.php
Normal file
11
mojotrollz/cron/qq/CRON_BOT_COUNT.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace SQL;
|
||||
class CRON_BOT_COUNT extends \SYSTEM\DB\QQ {
|
||||
public static function get_class(){return \get_class();}
|
||||
public static function mysql(){return
|
||||
'SELECT code as bot_count FROM system_log'.
|
||||
' WHERE class="LOG\\PLAYER_COUNT_TS"'.
|
||||
' ORDER BY `time` DESC'.
|
||||
' LIMIT 1';
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user