mirror of
https://gitlab.com/lunovox/e-urn.git
synced 2025-03-20 17:51:21 +00:00
This commit is contained in:
parent
a32474939c
commit
5d4bcc8db3
1 changed files with 21 additions and 16 deletions
37
api.lua
37
api.lua
|
@ -468,24 +468,29 @@ end)
|
||||||
|
|
||||||
--[[ ]]
|
--[[ ]]
|
||||||
minetest.after(3.5, function()
|
minetest.after(3.5, function()
|
||||||
|
local timecheck = 0
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
--local presname = modEUrn.handler.elected.president.name
|
timecheck = timecheck + dtime
|
||||||
local presname = modEUrn.getPresidentName()
|
if timecheck >= 60 then
|
||||||
if type(presname)=="string" and presname~="" then
|
timecheck = 0
|
||||||
local mesAtual = os.date("%m", os.time())
|
--local presname = modEUrn.handler.elected.president.name
|
||||||
local mesChecked = os.date("%m", tonumber(modEUrn.handler.elected.president.when))
|
local presname = modEUrn.getPresidentName()
|
||||||
if mesChecked ~= mesAtual then
|
if type(presname)=="string" and presname~="" then
|
||||||
local result, cause = modEUrn.doCheckPresident()
|
local mesAtual = os.date("%m", os.time())
|
||||||
local titlecolor = "#FF0000"
|
local mesChecked = os.date("%m", tonumber(modEUrn.handler.elected.president.when))
|
||||||
if result == true then
|
if mesChecked ~= mesAtual then
|
||||||
titlecolor = "#00FF00"
|
local result, cause = modEUrn.doCheckPresident()
|
||||||
modEUrn.doSave()
|
local titlecolor = "#FF0000"
|
||||||
|
if result == true then
|
||||||
|
titlecolor = "#00FF00"
|
||||||
|
minetest.chat_send_all(
|
||||||
|
core.colorize(titlecolor, "[E-URN]").." "..cause
|
||||||
|
)
|
||||||
|
modEUrn.doSave()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
minetest.chat_send_all(
|
end --Fim de if type(presname)=="string" and presname~="" then
|
||||||
core.colorize(titlecolor, "[E-URN]").." "..cause
|
end --Fim de if timecheck >= 60 then
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
--]]
|
--]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue