Seen: don't track seen data for stuff without a location
like the last commit, this happens on [subcommands]
This commit is contained in:
parent
df3de56c4c
commit
c7b7e6e3ad
|
@ -81,11 +81,13 @@ class Seen(Module):
|
||||||
|
|
||||||
# whatever it is, store it
|
# whatever it is, store it
|
||||||
try:
|
try:
|
||||||
db = self.get_db()
|
# if there's no where, this is probably a sub-command. don't learn it
|
||||||
cur = db.cursor()
|
if where:
|
||||||
statement = 'REPLACE INTO seen_nicks (nick, location, host, what) VALUES (?, ?, ?, ?)'
|
db = self.get_db()
|
||||||
cur.execute(statement, (nick, where, userhost, what.decode('utf-8', 'replace')))
|
cur = db.cursor()
|
||||||
db.commit()
|
statement = 'REPLACE INTO seen_nicks (nick, location, host, what) VALUES (?, ?, ?, ?)'
|
||||||
|
cur.execute(statement, (nick, where, userhost, what.decode('utf-8', 'replace')))
|
||||||
|
db.commit()
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
db.rollback()
|
db.rollback()
|
||||||
print("sqlite error: " + str(e))
|
print("sqlite error: " + str(e))
|
||||||
|
|
Loading…
Reference in New Issue