diff --git a/system/pages/serverinfo.php b/system/pages/serverinfo.php index f83c7d784b..cded4e5fe2 100644 --- a/system/pages/serverinfo.php +++ b/system/pages/serverinfo.php @@ -56,22 +56,22 @@ if(isset($whiteSkullTime)) $whiteSkullTime = eval('return ' . $whiteSkullTime . ';'); -$redSkullLength = isset($config['lua']['redSkullLength']) ? $config['lua']['redSkullLength'] : NULL; +$redSkullLength = isset($config['lua']['redSkullDuration']) ? $config['lua']['redSkullDuration'] : NULL; if(!isset($redSkullLength) && isset($config['lua']['red_skull_duration'])) $redSkullLength = $config['lua']['red_skull_duration']; if(isset($redSkullLength)) $redSkullLength = eval('return ' . $redSkullLength . ';'); -$blackSkull = false; -$blackSkullLength = NULL; +$blackSkull = true; +$blackSkullLength = isset($config['lua']['blackSkullDuration']) ? $config['lua']['blackSkullDuration'] : NULL; if(isset($config['lua']['useBlackSkull']) && getBoolean($config['lua']['useBlackSkull'])) { - $blackSkullLength = $config['lua']['blackSkullLength']; + $blackSkullLength = $config['lua']['blackSkullDuration']; $blackSkull = true; } else if(isset($config['lua']['black_skull_duration'])) { - $blackSkullLength = eval('return ' . $config['lua']['blackSkullLength'] . ';'); + $blackSkullLength = eval('return ' . $config['lua']['blackSkullDuration'] . ';'); $blackSkull = true; } @@ -88,7 +88,7 @@ $twig->display('serverinfo.html.twig', array( 'server_save' => $explodeServerSave, 'experienceStages' => isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages']) ? $config['lua']['experienceStages'] : null, - 'serverIp' => str_replace('/', '', str_replace('http://', '', $config['lua']['url'])), + 'serverIp' => str_replace('/', '', str_replace('http://', '', $config['lua']['ip'])), 'clientVersion' => $clientVersion, 'globalSaveHour' => isset($config['lua']['globalSaveEnabled']) && getBoolean($config['lua']['globalSaveEnabled']) ? $config['lua']['globalSaveHour'] : null, 'protectionLevel' => $config['lua']['protectionLevel'], @@ -106,9 +106,9 @@ 'redSkullLength' => $redSkullLength, 'blackSkull' => $blackSkull, 'blackSkullLength' => $blackSkullLength, - 'dailyFragsToRedSkull' => isset($config['lua']['dailyFragsToRedSkull']) ? $config['lua']['dailyFragsToRedSkull'] : (isset($config['lua']['kills_per_day_red_skull']) ? $config['lua']['kills_per_day_red_skull'] : null), - 'weeklyFragsToRedSkull' => isset($config['lua']['weeklyFragsToRedSkull']) ? $config['lua']['weeklyFragsToRedSkull'] : (isset($config['lua']['kills_per_week_red_skull']) ? $config['lua']['kills_per_week_red_skull'] : null), - 'monthlyFragsToRedSkull' => isset($config['lua']['monthlyFragsToRedSkull']) ? $config['lua']['monthlyFragsToRedSkull'] : (isset($config['lua']['kills_per_month_red_skull']) ? $config['lua']['kills_per_month_red_skull'] : null), + 'dailyFragsToRedSkull' => isset($config['lua']['dayKillsToRedSkull']) ? $config['lua']['dayKillsToRedSkull'] : (isset($config['lua']['dayKillsToRedSkull']) ? $config['lua']['dayKillsToRedSkull'] : null), + 'weeklyFragsToRedSkull' => isset($config['lua']['weekKillsToRedSkull']) ? $config['lua']['weekKillsToRedSkull'] : (isset($config['lua']['weekKillsToRedSkull']) ? $config['lua']['weekKillsToRedSkull'] : null), + 'monthlyFragsToRedSkull' => isset($config['lua']['monthKillsToRedSkull']) ? $config['lua']['monthKillsToRedSkull'] : (isset($config['lua']['monthKillsToRedSkull']) ? $config['lua']['monthKillsToRedSkull'] : null), 'dailyFragsToBlackSkull' => isset($config['lua']['dailyFragsToBlackSkull']) ? $config['lua']['dailyFragsToBlackSkull'] : (isset($config['lua']['kills_per_day_black_skull']) ? $config['lua']['kills_per_day_black_skull'] : null), 'weeklyFragsToBlackSkull' => isset($config['lua']['weeklyFragsToBlackSkull']) ? $config['lua']['weeklyFragsToBlackSkull'] : (isset($config['lua']['kills_per_week_black_skull']) ? $config['lua']['kills_per_week_black_skull'] : null), 'monthlyFragsToBlackSkull' => isset($config['lua']['monthlyFragsToBlackSkull']) ? $config['lua']['monthlyFragsToBlackSkull'] : (isset($config['lua']['kills_per_month_black_skull']) ? $config['lua']['kills_per_month_black_skull'] : null), diff --git a/system/templates/serverinfo.html.twig b/system/templates/serverinfo.html.twig index 401a23c8a9..e91eb82e26 100644 --- a/system/templates/serverinfo.html.twig +++ b/system/templates/serverinfo.html.twig @@ -1,23 +1,26 @@ +
PZ Lock: {{ pzLocked / (60 * 1000) }} min |
White Skull Time: {{ whiteSkullTime }} min |
Red skull length: {{ redSkullLength / (24 * 60 * 60) }} days |
+ Frag Duration: + {% if days > 0 %} {{ days }} days {% endif %} + {% if hours > 0 %} {{ hours }} hours {% endif %} + {% if minutes > 0 %} {{ minutes }} mins {% endif %} + {% if seconds > 0 %} {{ seconds }} segs {% endif %} + | +
RedSkull Duration: {{ redSkullLength }} days |
Black skull length: {{ blackSkullLength / (24 * 60 * 60) }} days |
BlackSkull Duration: {{ blackSkullLength }} days |