More fixes to displaying online record

This commit is contained in:
slawkens 2024-10-04 21:36:13 +02:00
parent e8fedb8d16
commit f7c9a67a96

View File

@ -100,7 +100,7 @@ foreach($playersOnline as $player) {
} }
$record = ''; $record = '';
if($players > 0) { if(count($players_data) > 0) {
if( setting('core.online_record')) { if( setting('core.online_record')) {
$result = null; $result = null;
$timestamp = false; $timestamp = false;
@ -114,7 +114,7 @@ if($players > 0) {
} }
} }
if($record) { if($result) {
$record = 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.'); $record = 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.');
} }
} }