diff --git a/DrBotIRC.py b/DrBotIRC.py index c42ccba..15381b4 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -110,8 +110,11 @@ class DrBotIRC(irclib.IRC): h = self.handlers for handler in h.get("all_events", []) + h.get(event.eventtype(), []): - if handler[1](connection, event) == "NO MORE": - return + try: + if handler[1](connection, event) == "NO MORE": + return + except Exception as e: + print("exception floated up to DrBotIrc: " + str(e)) def try_to_replace_event_text_with_module_text(self, connection, event): """Do something very similar to _handle_event, but for recursion.