use PMs instead of notices for .showtells

This commit is contained in:
Ryan Hitchman 2014-06-02 20:11:11 -07:00
parent 200a2158bb
commit e589bd6e21
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ def tellinput(paraml, input=None, db=None):
@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)."
db_init(db)
@ -56,13 +56,13 @@ def showtells(inp, nick='', chan='', notice=None, db=None):
tells = get_tells(db, nick)
if not tells:
notice("You have no pending tells.")
pm("You have no pending tells.")
return
for tell in tells:
user_from, message, time, chan = tell
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(?)",
(nick,))