diff options
-rwxr-xr-x | fot.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -121,7 +121,10 @@ class Bot(irc.IRCClient): for mod in self.msg_callbacks: if priv or mod in self.module_channels[channel]: - mod.privmsg(nick, channel, msg) + try: + mod.privmsg(nick, channel, msg) + except Exception as e: + print e msg = msg.split(None, 1) if not len(msg): @@ -134,7 +137,10 @@ class Bot(irc.IRCClient): if kw in self.keywords: mod = self.keywords[kw] if priv or mod in self.module_channels[channel]: - mod.keyword(nick, channel, kw, msg) + try: + mod.keyword(nick, channel, kw, msg) + except Exception as e: + print e def kickedFrom(self, channel, kicker, message): self.join(channel) |