X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/538b1a54c9255a37f9b9fdf365e513689246d9ca..a83e1f9c890a4d639765017759de49d496c1539b:/bot.py diff --git a/bot.py b/bot.py index 44181f4..10be7f6 100644 --- a/bot.py +++ b/bot.py @@ -114,10 +114,10 @@ class Bot(object): cbret = callback(self, user, chan, target, *pieces[1:]) if cbret is NotImplemented: self.msg(user, "Command not implemented.") - else: - self.msg(user, "No such command.") def msg(self, target, msg): + if target is None or msg is None: return + if isinstance(target, self.parent.User): self.conn.send("NOTICE %s :%s" % (target.nick, msg)) elif isinstance(target, self.parent.Channel): self.conn.send("PRIVMSG %s :%s" % (target.name, msg)) elif isinstance(target, basestring):