From 39d1127cf18b29d7f9b2cf006a52449fb0eb5abd Mon Sep 17 00:00:00 2001 From: slawkens Date: Wed, 14 Oct 2020 13:10:22 +0200 Subject: [PATCH] You can now disable status checking for testing purposes Useful for local testing when there is no server running --- config.php | 1 + system/status.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/config.php b/config.php index 689777a3..376fad1d 100644 --- a/config.php +++ b/config.php @@ -262,6 +262,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.0, // how long to wait for the initial response from the server (default: 2 seconds) diff --git a/system/status.php b/system/status.php index 6b9f2049..7b10a1aa 100644 --- a/system/status.php +++ b/system/status.php @@ -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'];