From 5e83e5be861756eb0995f519acbc62f45a00518f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 16 Aug 2014 11:10:06 +0200 Subject: [PATCH] Fix deletion --- functions.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions.lua b/functions.lua index 2bb8f89..2562c02 100644 --- a/functions.lua +++ b/functions.lua @@ -60,15 +60,13 @@ function ipnames.load_data() ignore = true end if not ignore then + data[3] = tonumber(data[3]) or 0 -- Remove IP after 2 weeks - data[3] = data[3] or "" - data[3] = tonumber(data[3]) - if t - data[3] > (3600 * 24 * 14) then + if data[3] > 0 and t - data[3] > (3600 * 24 * 14) then ignore = true end end if not ignore then - data[3] = data[3] or 0 ipnames.data[data[1]] = {data[2], data[3]} end end