mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 16:30:19 +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,
|
||||
})
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
chatplus.count = chatplus.count + dtime
|
||||
if chatplus.count > 5 then
|
||||
chatplus.count = 0
|
||||
local function tick()
|
||||
-- loop through player list
|
||||
for key,value in pairs(chatplus.players) do
|
||||
if (
|
||||
@ -370,8 +367,9 @@ minetest.register_globalstep(function(dtime)
|
||||
chatplus.loggedin[key].lastcount = #value.inbox
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
minetest.after(5, tick)
|
||||
end
|
||||
tick()
|
||||
|
||||
chatplus.register_handler(function(from,to,msg)
|
||||
if chatplus.setting("distance") <= 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user