diff --git a/mods/xban2/dbimport.lua b/mods/xban2/dbimport.lua old mode 100755 new mode 100644 diff --git a/mods/xban2/doc/API.md b/mods/xban2/doc/API.md old mode 100755 new mode 100644 diff --git a/mods/xban2/doc/dbformat.txt b/mods/xban2/doc/dbformat.txt old mode 100755 new mode 100644 diff --git a/mods/xban2/gui.lua b/mods/xban2/gui.lua old mode 100755 new mode 100644 diff --git a/mods/xban2/importers/minetest.lua b/mods/xban2/importers/minetest.lua old mode 100755 new mode 100644 diff --git a/mods/xban2/importers/v1.lua b/mods/xban2/importers/v1.lua old mode 100755 new mode 100644 diff --git a/mods/xban2/importers/v2.lua b/mods/xban2/importers/v2.lua old mode 100755 new mode 100644 diff --git a/mods/xban2/init.lua b/mods/xban2/init.lua old mode 100755 new mode 100644 index 8e81c7bd..fef26ea3 --- a/mods/xban2/init.lua +++ b/mods/xban2/init.lua @@ -170,10 +170,19 @@ end) minetest.register_on_joinplayer(function(player) local name = player:get_player_name() + local e = xban.find_entry(name) local ip = minetest.get_player_ip(name) - local e = xban.find_entry(name) or xban.find_entry(ip, true) + if not e then + if ip then + e = xban.find_entry(ip, true) + else + return + end + end e.names[name] = true - e.names[ip] = true + if ip then + e.names[ip] = true + end e.last_seen = os.time() end) diff --git a/mods/xban2/serialize.lua b/mods/xban2/serialize.lua old mode 100755 new mode 100644