You can now disable status checking for testing purposes

Useful for local testing when there is no server running
This commit is contained in:
slawkens 2020-10-14 13:10:22 +02:00
parent b3d1274ffe
commit 4fd5922784
2 changed files with 5 additions and 0 deletions

View File

@ -267,6 +267,7 @@ $config = array(
'last_kills_limit' => 50, // max. number of deaths shown on the last kills page
// status, took automatically from config file if empty
'status_enabled' => true, // you can disable status checking by settings this to "false"
'status_ip' => '',
'status_port' => '',
'status_timeout' => 2, // how long to wait for the initial response from the server (default: 2 seconds)

View File

@ -17,6 +17,10 @@ $status['lastCheck'] = 0;
$status['uptime'] = '0h 0m';
$status['monsters'] = 0;
if(config('status_enabled') === false) {
return;
}
$status_ip = $config['lua']['ip'];
if(isset($config['lua']['statusProtocolPort'])) {
$config['lua']['loginPort'] = $config['lua']['statusProtocolPort'];