Fix mistake during introduction of canafk priv
This commit is contained in:
parent
cab30208e0
commit
9f6ccaf386
1 changed files with 1 additions and 2 deletions
|
@ -39,10 +39,9 @@ minetest.register_globalstep(function(dtime)
|
||||||
for playerName,_ in pairs(players) do
|
for playerName,_ in pairs(players) do
|
||||||
local player = minetest.get_player_by_name(playerName)
|
local player = minetest.get_player_by_name(playerName)
|
||||||
if player then
|
if player then
|
||||||
|
|
||||||
--Check for inactivity once every CHECK_INTERVAL seconds
|
--Check for inactivity once every CHECK_INTERVAL seconds
|
||||||
checkTimer = checkTimer + dtime
|
checkTimer = checkTimer + dtime
|
||||||
if checkTimer > CHECK_INTERVAL and not minetest.check_player_privs({ canafk = true }) then
|
if checkTimer > CHECK_INTERVAL and not minetest.check_player_privs(player, { canafk = true }) then
|
||||||
checkTimer = 0
|
checkTimer = 0
|
||||||
|
|
||||||
--Kick player if he/she has been inactive for longer than MAX_INACTIVE_TIME seconds
|
--Kick player if he/she has been inactive for longer than MAX_INACTIVE_TIME seconds
|
||||||
|
|
Loading…
Reference in a new issue