don't try to privmsg (and then crash) if replystr is None

This commit is contained in:
Brian S. Stephan 2010-12-08 22:18:46 -06:00
parent 2690c0208c
commit 914e86d567
1 changed files with 5 additions and 4 deletions

View File

@ -215,10 +215,11 @@ class Module(object):
return self.reply(connection, replypath, 'hello')
"""
if replypath is None:
return replystr
else:
connection.privmsg(replypath, replystr)
if replystr is not None:
if replypath is None:
return replystr
else:
connection.privmsg(replypath, replystr)
def try_recursion(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
"""