From a32474939c8b4e784d94a91579f885c300ec4070 Mon Sep 17 00:00:00 2001 From: Lunovox Date: Thu, 29 Feb 2024 21:21:02 -0300 Subject: [PATCH] =?UTF-8?q?[bugfix]=20Corre=C3=A7=C3=A3o=20de=20bug=20cr?= =?UTF-8?q?=C3=ADtico=20de=20auto-contagem=20de=20votos!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.lua | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/api.lua b/api.lua index 6466671..9ea85f3 100644 --- a/api.lua +++ b/api.lua @@ -476,16 +476,14 @@ minetest.after(3.5, function() local mesChecked = os.date("%m", tonumber(modEUrn.handler.elected.president.when)) if mesChecked ~= mesAtual then local result, cause = modEUrn.doCheckPresident() - if result == true then - minetest.chat_send_all( - core.colorize("#00FF00", "[E-URN]").." "..cause - ) - else - minetest.chat_send_player( - playername, - core.colorize("#FF0000", "[E-URN]").." "..cause - ) - end + local titlecolor = "#FF0000" + if result == true then + titlecolor = "#00FF00" + modEUrn.doSave() + end + minetest.chat_send_all( + core.colorize(titlecolor, "[E-URN]").." "..cause + ) end end end)