use PMs instead of notices for .showtells
This commit is contained in:
parent
200a2158bb
commit
e589bd6e21
|
@ -48,7 +48,7 @@ def tellinput(paraml, input=None, db=None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def showtells(inp, nick='', chan='', notice=None, db=None):
|
def showtells(inp, nick='', chan='', pm=None, db=None):
|
||||||
".showtells -- view all pending tell messages (sent in PM)."
|
".showtells -- view all pending tell messages (sent in PM)."
|
||||||
|
|
||||||
db_init(db)
|
db_init(db)
|
||||||
|
@ -56,13 +56,13 @@ def showtells(inp, nick='', chan='', notice=None, db=None):
|
||||||
tells = get_tells(db, nick)
|
tells = get_tells(db, nick)
|
||||||
|
|
||||||
if not tells:
|
if not tells:
|
||||||
notice("You have no pending tells.")
|
pm("You have no pending tells.")
|
||||||
return
|
return
|
||||||
|
|
||||||
for tell in tells:
|
for tell in tells:
|
||||||
user_from, message, time, chan = tell
|
user_from, message, time, chan = tell
|
||||||
past = timesince.timesince(time)
|
past = timesince.timesince(time)
|
||||||
notice("%s said %s ago in %s: %s" % (user_from, past, chan, message))
|
pm("%s said %s ago in %s: %s" % (user_from, past, chan, message))
|
||||||
|
|
||||||
db.execute("delete from tell where user_to=lower(?)",
|
db.execute("delete from tell where user_to=lower(?)",
|
||||||
(nick,))
|
(nick,))
|
||||||
|
|
Loading…
Reference in New Issue