Skip to content

Commit

Permalink
[tell] Fixes #418. Error when not enough args given
Browse files Browse the repository at this point in the history
  • Loading branch information
flyte committed Jan 12, 2014
1 parent da03b39 commit 34dbb69
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions willie/modules/tell.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,20 @@ def get_user_time(bot, nick):
def f_remind(bot, trigger):
"""Give someone a message the next time they're seen"""
teller = trigger.nick

verb = trigger.group(1)
tellee, msg = trigger.group(2).split(None, 1)

tellee = Nick(tellee.rstrip('.,:;'))
if not trigger.group(3):
bot.reply("%s whom?" % verb)
return

tellee = trigger.group(3).rstrip('.,:;')
msg = trigger.group(2).lstrip(tellee).lstrip()

if not msg:
bot.reply("%s %s what?" % (verb, tellee))
return

tellee = Nick(tellee)

if not os.path.exists(bot.tell_filename):
return
Expand Down

0 comments on commit 34dbb69

Please sign in to comment.