diff --git a/join.lua b/join.lua index 4e5275f..ef7e768 100644 --- a/join.lua +++ b/join.lua @@ -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