I think this fixes the 3 minute urlhistory bug. Sorry >_<
This commit is contained in:
parent
b7ef6968f7
commit
def6537f72
|
@ -31,13 +31,13 @@ def insert_history(db, chan, url, nick):
|
||||||
|
|
||||||
|
|
||||||
def get_history_duration(db, chan, url, duration):
|
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 "
|
return db.execute("select nick, time from urlhistory where "
|
||||||
"chan=? and url=? order by time desc", (chan, url)).fetchall()
|
"chan=? and url=? order by time desc", (chan, url)).fetchall()
|
||||||
|
|
||||||
|
|
||||||
def get_history(db, chan, url):
|
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)
|
return get_history_duration(db, chan, url, expiration_period)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue