]> jfr.im git - erebus.git/blobdiff - bot.py
Combined spotify/twitch/youtube to urls
[erebus.git] / bot.py
diff --git a/bot.py b/bot.py
index 44181f4f293bb8b4f8037a45e96eee5ce03ae40f..10be7f6a4908207091535cc1d05f4021c53eddd5 100644 (file)
--- 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):