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 @@ +

{{ config.lua.serverName }}

@@ -94,7 +97,7 @@ IP: {{ serverIp }} (Port: {{ config.lua.loginPort }}) Client: {{ clientVersion }} - Online: 24/7 + Uptime: {{ status.uptimeReadable }} Global save: {{ server_save.0 }}:{{ server_save.1 }} World type: {{ config.lua.worldType|upper }} Protection level: {{ protectionLevel }} @@ -153,7 +156,7 @@ Skills: x{{ rateSkill }} Loot: x{{ rateLoot }} Spawn: x{{ rateSpawn }} - Guilds: {{ config.guild_need_level }} + Need level to create Guild: {{ config.guild_need_level }} {% if houseLevel %} Houses: {{ houseLevel }} level {% endif %} @@ -201,29 +204,43 @@ - - + {% set whiteSkullTime = 7 * 60 %} + {# Converter para dias, horas, minutos e segundos #} + {% set days = whiteSkullTime // (24 * 60) %} + {% set hours = (whiteSkullTime % (24 * 60)) // 60 %} + {% set minutes = whiteSkullTime % 60 %} + {% set seconds = 0 %} + + + + {% if blackSkull %} - + {% endif %} - {% if killsToRedSkull is defined %} -
  • Kills to red skull: {{ config.lua.killsToRedSkull }}
  • - {% elseif config.lua.dailyFragsToRedSkull is defined or config.lua.kills_per_day_red_skull is defined %} -
  • + {% if dayKillsToRedSkull is defined %} +
  • Kills to red skull: {{ config.lua.dayKillsToRedSkull }}
  • + {% elseif config.lua.dayKillsToRedSkull is defined or config.lua.kills_per_day_red_skull is defined %} +

    Red skull

    - {% if blackSkull and config.lua.dailyFragsToBlackSkull is defined or config.lua.kills_per_day_black_skull is defined %} +

    Black skull

    - {% elseif config.lua.dailyFragsToBanishment is defined %} + {% if config.lua.dailyFragsToBanishment is defined %}

    Banishment

    {% endif %} - + {% endif %} {% if banishmentLength %}
  • Banishment length: {{ banishmentLength }} days
  • 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