Lift restrictions for date() function in atlatc

master
orwell96 2019-02-22 12:52:33 +01:00
parent 086b2c0fb0
commit e5c4e8cc1f
1 changed files with 8 additions and 2 deletions

View File

@ -58,8 +58,14 @@ local function safe_print(t, ...)
minetest.chat_send_all(str)
end
local function safe_date()
return(os.date("*t",os.time()))
local function safe_date(f, t)
if not f then
-- fall back to old behavior
return(os.date("*t",os.time()))
else
--pass parameters
return os.date(f,t)
end
end
-- string.rep(str, n) with a high value for n can be used to DoS