1
0
mirror of https://github.com/SmallJoker/names_per_ip.git synced 2024-11-13 05:40:37 +01:00

ipnames.save_data: Use os.time() for incorrect table value

This commit is contained in:
tenplus1 2016-05-21 13:01:39 +01:00 committed by SmallJoker
parent e1c2c99690
commit 353e651454

View File

@ -82,11 +82,8 @@ function ipnames.save_data()
ipnames.changes = false
local file = io.open(ipnames.file, "w")
for k, v in pairs(ipnames.data) do
if v[2] > 0 then
file:write(k.."|"..v[1].."|"..v[2].."\n")
else
file:write(k.."|"..v[1].."\n")
end
v[2] = v[2] or os.time()
file:write(k.."|"..v[1].."|"..v[2].."\n")
end
io.close(file)
end
@ -111,4 +108,4 @@ function ipnames.save_whitelist()
end
end
io.close(file)
end
end