mirror of
https://github.com/SmallJoker/names_per_ip.git
synced 2025-01-09 17:10:18 +01:00
ipnames.save_data: Use os.time() for incorrect table value
This commit is contained in:
parent
e1c2c99690
commit
353e651454
@ -82,11 +82,8 @@ function ipnames.save_data()
|
|||||||
ipnames.changes = false
|
ipnames.changes = false
|
||||||
local file = io.open(ipnames.file, "w")
|
local file = io.open(ipnames.file, "w")
|
||||||
for k, v in pairs(ipnames.data) do
|
for k, v in pairs(ipnames.data) do
|
||||||
if v[2] > 0 then
|
v[2] = v[2] or os.time()
|
||||||
file:write(k.."|"..v[1].."|"..v[2].."\n")
|
file:write(k.."|"..v[1].."|"..v[2].."\n")
|
||||||
else
|
|
||||||
file:write(k.."|"..v[1].."\n")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
io.close(file)
|
io.close(file)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user