forked from mtcontrib/factions
Remove: ip if player is not in a faction
This commit is contained in:
parent
e962c88309
commit
5dfd32df1b
@ -54,19 +54,14 @@ minetest.register_on_leaveplayer(function(player)
|
|||||||
faction.last_logon = os.time()
|
faction.last_logon = os.time()
|
||||||
factions.factions.set(facname, faction)
|
factions.factions.set(facname, faction)
|
||||||
factions.onlineplayers[facname][name] = nil
|
factions.onlineplayers[facname][name] = nil
|
||||||
local id_name2 = name .. "factionName"
|
|
||||||
local id_name3 = name .. "powerWatch"
|
|
||||||
|
|
||||||
if hud_ids[id_name2] then
|
hud_ids[name .. "factionName"] = nil
|
||||||
hud_ids[id_name2] = nil
|
hud_ids[name .. "powerWatch"] = nil
|
||||||
end
|
else
|
||||||
if hud_ids[id_name3] then
|
factions.remove_key(factions.player_ips, name, nil, "ip", true)
|
||||||
hud_ids[id_name3] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
factions.onlineplayers[facname] = nil
|
|
||||||
on_death[name] = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
on_death[name] = nil
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user