forked from mff/names_per_ip
Fix deletion
This commit is contained in:
parent
61fd749b42
commit
5e83e5be86
@ -60,15 +60,13 @@ function ipnames.load_data()
|
|||||||
ignore = true
|
ignore = true
|
||||||
end
|
end
|
||||||
if not ignore then
|
if not ignore then
|
||||||
|
data[3] = tonumber(data[3]) or 0
|
||||||
-- Remove IP after 2 weeks
|
-- Remove IP after 2 weeks
|
||||||
data[3] = data[3] or ""
|
if data[3] > 0 and t - data[3] > (3600 * 24 * 14) then
|
||||||
data[3] = tonumber(data[3])
|
|
||||||
if t - data[3] > (3600 * 24 * 14) then
|
|
||||||
ignore = true
|
ignore = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not ignore then
|
if not ignore then
|
||||||
data[3] = data[3] or 0
|
|
||||||
ipnames.data[data[1]] = {data[2], data[3]}
|
ipnames.data[data[1]] = {data[2], data[3]}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user