summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGael-de-Sailly <gael.chretien@akeonet.com>2015-10-04 15:22:48 +0200
committerGael-de-Sailly <gael.chretien@akeonet.com>2015-10-04 15:22:48 +0200
commit9a7e5e4fcaae0a4d7645f33b864d093c535cbc2a (patch)
treea1382255f8998e4af6358ff470a82b63db6e06c3
parenta9b9dfbbb82bdc87410f4dd98e8d600bc3e2863f (diff)
Fixed mistake
and use os.time instead of os.clock
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 4ba394e..8fe30ae 100644
--- a/init.lua
+++ b/init.lua
@@ -18,12 +18,12 @@ minetest.register_chatcommand("mapfix", {
local pos = minetest.get_player_by_name(name):getpos()
local size = tonumber(param) or 40
local privs = minetest.check_player_privs(name, {server=true})
- local time = os.clock()
+ local time = os.time()
if not privs then
if size > 50 and not privs then
return false, "You need the server privilege to exceed the radius of " .. max_size .. " blocks"
- elseif time - previous < 15 then
+ elseif time - previous < delay then
return false, "Wait at least " .. delay .. " seconds from the previous \"/mapfix\"."
end
previous = time