Another tweak
This commit is contained in:
parent
ff2ec39914
commit
ebeeb7d09f
1 changed files with 7 additions and 6 deletions
|
@ -15,12 +15,14 @@ def db_init(db):
|
||||||
|
|
||||||
@hook.singlethread
|
@hook.singlethread
|
||||||
@hook.event('PRIVMSG', ignorebots=False)
|
@hook.event('PRIVMSG', ignorebots=False)
|
||||||
def seeninput(paraml, input=None, db=None, bot=None):
|
def seen_sieve(paraml, input=None, db=None, bot=None):
|
||||||
db_init(db)
|
db_init(db)
|
||||||
db.execute("insert or replace into seen_user(name, time, quote, chan, host)"
|
# keep private messages private
|
||||||
"values(?,?,?,?,?)", (input.nick.lower(), time.time(), input.msg,
|
if input.chan[:1] == "#":
|
||||||
input.chan, input.host))
|
db.execute("insert or replace into seen_user(name, time, quote, chan, host)"
|
||||||
db.commit()
|
"values(?,?,?,?,?)", (input.nick.lower(), time.time(), input.msg,
|
||||||
|
input.chan, input.mask))
|
||||||
|
db.commit()
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
|
@ -28,7 +30,6 @@ def seen(inp, nick='', chan='', db=None, input=None):
|
||||||
".seen <nick> -- Tell when a nickname was last in active in one of this bot's channels."
|
".seen <nick> -- Tell when a nickname was last in active in one of this bot's channels."
|
||||||
|
|
||||||
if input.conn.nick.lower() == inp.lower():
|
if input.conn.nick.lower() == inp.lower():
|
||||||
# user is looking for us, being a smartass
|
|
||||||
return "You need to get your eyes checked."
|
return "You need to get your eyes checked."
|
||||||
|
|
||||||
if inp.lower() == nick.lower():
|
if inp.lower() == nick.lower():
|
||||||
|
|
Reference in a new issue