mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-02 21:30:20 +01:00
[chatplus] Don't use globalsteps
This commit is contained in:
parent
2d16e24d2d
commit
67ed362f27
@ -326,10 +326,7 @@ minetest.register_chatcommand("mail", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
local function tick()
|
||||||
chatplus.count = chatplus.count + dtime
|
|
||||||
if chatplus.count > 5 then
|
|
||||||
chatplus.count = 0
|
|
||||||
-- loop through player list
|
-- loop through player list
|
||||||
for key,value in pairs(chatplus.players) do
|
for key,value in pairs(chatplus.players) do
|
||||||
if (
|
if (
|
||||||
@ -370,8 +367,9 @@ minetest.register_globalstep(function(dtime)
|
|||||||
chatplus.loggedin[key].lastcount = #value.inbox
|
chatplus.loggedin[key].lastcount = #value.inbox
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
minetest.after(5, tick)
|
||||||
end)
|
end
|
||||||
|
tick()
|
||||||
|
|
||||||
chatplus.register_handler(function(from,to,msg)
|
chatplus.register_handler(function(from,to,msg)
|
||||||
if chatplus.setting("distance") <= 0 then
|
if chatplus.setting("distance") <= 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user