Fix mistake during introduction of canafk priv

This commit is contained in:
rubenwardy 2017-11-07 00:31:00 +00:00
parent cab30208e0
commit 9f6ccaf386

View file

@ -39,10 +39,9 @@ minetest.register_globalstep(function(dtime)
for playerName,_ in pairs(players) do
local player = minetest.get_player_by_name(playerName)
if player then
--Check for inactivity once every CHECK_INTERVAL seconds
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
--Kick player if he/she has been inactive for longer than MAX_INACTIVE_TIME seconds