[bugfix] Correção de bug crítico de auto-contagem de votos!

This commit is contained in:
Lunovox 2024-02-29 21:21:02 -03:00
parent 862fc7c446
commit a32474939c

14
api.lua
View file

@ -476,16 +476,14 @@ minetest.after(3.5, function()
local mesChecked = os.date("%m", tonumber(modEUrn.handler.elected.president.when)) local mesChecked = os.date("%m", tonumber(modEUrn.handler.elected.president.when))
if mesChecked ~= mesAtual then if mesChecked ~= mesAtual then
local result, cause = modEUrn.doCheckPresident() local result, cause = modEUrn.doCheckPresident()
local titlecolor = "#FF0000"
if result == true then if result == true then
minetest.chat_send_all( titlecolor = "#00FF00"
core.colorize("#00FF00", "[E-URN]").." "..cause modEUrn.doSave()
)
else
minetest.chat_send_player(
playername,
core.colorize("#FF0000", "[E-URN]").." "..cause
)
end end
minetest.chat_send_all(
core.colorize(titlecolor, "[E-URN]").." "..cause
)
end end
end end
end) end)