Made a potential AssertionError not get raised.

This commit is contained in:
Jeremy Fincher 2004-02-16 17:28:12 +00:00
parent 6d117b2992
commit de72ad4026

View File

@ -122,12 +122,17 @@ def reply(msg, s, prefixName=True, private=False, notice=False, to=None):
else:
m = ircmsgs.privmsg(msg.args[0], s)
else:
m = ircmsgs.privmsg(to, s)
if s:
m = ircmsgs.privmsg(to, s)
else:
return error(msg, 'I tried to send you an empty message.',
prefixName=prefixName, private=private,
notice=notice, to=to)
return m
def error(msg, s):
def error(msg, s, **kwargs):
"""Makes an error reply to msg with the appropriate error payload."""
return reply(msg, 'Error: ' + s)
return reply(msg, 'Error: ' + s, **kwargs)
def getHelp(method, name=None):
if name is None: