summaryrefslogtreecommitdiff
path: root/src/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.py')
-rw-r--r--src/events.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/events.py b/src/events.py
index 8def6cb0..e66c5ee5 100644
--- a/src/events.py
+++ b/src/events.py
@@ -40,6 +40,7 @@ class EventHandler(object):
'muc_nickchange': [],
'muc_ban': [],
'send_normal_presence': [],
+ 'ignored_private': [],
}
def add_event_handler(self, name, callback, position=0):
@@ -63,7 +64,10 @@ class EventHandler(object):
"""
Call all the callbacks associated to the given event name.
"""
- callbacks = self.events[name]
+ callbacks = self.events.get(name, None)
+ if callbacks is None:
+ log.debug('%s: No such event.', name)
+ return
for callback in callbacks:
callback(*args, **kwargs)