mirror of
https://github.com/SmallJoker/names_per_ip.git
synced 2025-03-22 03:50:42 +01:00
fix nil error
fix nil error
This commit is contained in:
parent
e1c2c99690
commit
f783039892
@ -82,7 +82,7 @@ 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
|
if v[2] and v[2] > 0 then
|
||||||
file:write(k.."|"..v[1].."|"..v[2].."\n")
|
file:write(k.."|"..v[1].."|"..v[2].."\n")
|
||||||
else
|
else
|
||||||
file:write(k.."|"..v[1].."\n")
|
file:write(k.."|"..v[1].."\n")
|
||||||
@ -111,4 +111,4 @@ function ipnames.save_whitelist()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
io.close(file)
|
io.close(file)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user