1
0
mirror of https://github.com/SmallJoker/names_per_ip.git synced 2025-06-30 14:40:20 +02:00

Timestamp!

This commit is contained in:
SmallJoker
2014-08-16 09:53:41 +02:00
parent c21a7c647a
commit 93dfff65ee
2 changed files with 10 additions and 10 deletions

View File

@ -63,7 +63,7 @@ minetest.register_on_prejoinplayer(function(name, ip)
local count = 1
local names = ""
for k, v in pairs(ipnames.data) do
if v == ip then
if v[1] == ip then
if ipnames.whitelist[k] then
count = 0
break
@ -82,7 +82,8 @@ end)
-- Save IP if player joined
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
ipnames.data[name] = ipnames.tmp_data[name]
local t = os.time()
ipnames.data[name] = {ipnames.tmp_data[name], t}
ipnames.tmp_data[name] = nil
ipnames.changes = true
end)