From def6537f7240f70f840e19c65ea046685b8e84e1 Mon Sep 17 00:00:00 2001 From: melonhead Date: Sat, 6 Mar 2010 17:19:22 +0000 Subject: [PATCH] I think this fixes the 3 minute urlhistory bug. Sorry >_< --- plugins/urlhistory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/urlhistory.py b/plugins/urlhistory.py index 5c32b83..cffe850 100644 --- a/plugins/urlhistory.py +++ b/plugins/urlhistory.py @@ -31,13 +31,13 @@ def insert_history(db, chan, url, nick): def get_history_duration(db, chan, url, duration): - db.execute("delete from urlhistory where time < ?", - (time.time() - duration,)) return db.execute("select nick, time from urlhistory where " "chan=? and url=? order by time desc", (chan, url)).fetchall() def get_history(db, chan, url): + db.execute("delete from urlhistory where time < ?", + (time.time() - duration,)) return get_history_duration(db, chan, url, expiration_period)