1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 01:30:38 +01:00

Update xban2 by kaeza

This commit is contained in:
LeMagnesium 2015-01-03 13:56:51 +01:00
parent e6c3045784
commit 583f589b43
9 changed files with 11 additions and 2 deletions

0
mods/xban2/dbimport.lua Executable file → Normal file
View File

0
mods/xban2/doc/API.md Executable file → Normal file
View File

0
mods/xban2/doc/dbformat.txt Executable file → Normal file
View File

0
mods/xban2/gui.lua Executable file → Normal file
View File

0
mods/xban2/importers/minetest.lua Executable file → Normal file
View File

0
mods/xban2/importers/v1.lua Executable file → Normal file
View File

0
mods/xban2/importers/v2.lua Executable file → Normal file
View File

13
mods/xban2/init.lua Executable file → Normal file
View File

@ -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)

0
mods/xban2/serialize.lua Executable file → Normal file
View File