From 6387a54bb767ff947bc7fcde7c7f6fd6908bbe01 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Wed, 15 Jun 2016 03:52:35 +0200 Subject: [PATCH] [shutdown] Fix hour detection and tick more often --- mods/shutdown/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/shutdown/init.lua b/mods/shutdown/init.lua index 9960201d..446c208c 100755 --- a/mods/shutdown/init.lua +++ b/mods/shutdown/init.lua @@ -32,7 +32,7 @@ local function tick() local heure = os.date("%H") local minute = os.date("%M") -- Warn every days - if heure == "4" then + if heure == "04" then if minute == "00" then minetest.chat_send_all("Rappel : Redémarrage journalier du serveur dans 30 minutes. (Dure 30 minutes)") minetest.chat_send_all("Reminder : Daily reboot of the server in 30 minutes. (Lasts 30 minutes)") @@ -52,7 +52,7 @@ local function tick() -- minetest.request_shutdown() end end - minetest.after(60, tick) + minetest.after(20, tick) end tick()