ensure to delete jail cubic after leave player

This commit is contained in:
localhost_frssoft 2023-10-03 15:53:02 +03:00
parent 8e7a1f6af3
commit 81e3bbcdc3

View file

@ -19,6 +19,7 @@ local failed_counter = {}
local cubic_jail_entities = {}
function fediauth.remove_lock_cube(playername)
if cubic_jail_entities[playername] == nil then return end
for _, obj in ipairs(cubic_jail_entities[playername]) do
obj:remove()
end
@ -157,6 +158,7 @@ minetest.register_on_leaveplayer(function(player, timed_out)
local playername = player:get_player_name()
fediauth_sessions[playername] = nil
fediauth.discard_passw(playername)
fediauth.remove_lock_cube(playername)
end)
-- check sessions periodically and kick if timed out