summaryrefslogtreecommitdiff
path: root/src/events.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-12 16:51:24 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-12 16:51:24 +0100
commite67e22766f0da948ee9f310d29278371ef9b0563 (patch)
tree736b13f2f7f217ef94bec95404d7fa8a87c16d87 /src/events.py
parent75ae1772e49a59b373c26d1c942f25edd473921c (diff)
parent05ef3594894e0bcbe80b98e81c2a2659ea01855f (diff)
downloadpoezio-e67e22766f0da948ee9f310d29278371ef9b0563.tar.gz
poezio-e67e22766f0da948ee9f310d29278371ef9b0563.tar.bz2
poezio-e67e22766f0da948ee9f310d29278371ef9b0563.tar.xz
poezio-e67e22766f0da948ee9f310d29278371ef9b0563.zip
Merge branch 'master' of http://git.louiz.org/poezio
Diffstat (limited to 'src/events.py')
-rw-r--r--src/events.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/events.py b/src/events.py
index 22d60ddf..e94acb80 100644
--- a/src/events.py
+++ b/src/events.py
@@ -20,14 +20,22 @@ class EventHandler(object):
"""
def __init__(self):
self.events = {
- # when you are highlighted in a muc tab
'highlight': [],
'muc_say': [],
+ 'muc_say_after': [],
'conversation_say': [],
+ 'conversation_say_after': [],
'private_say': [],
+ 'private_say_after': [],
'conversation_msg': [],
'private_msg': [],
'muc_msg': [],
+ 'normal_chatstate': [],
+ 'muc_chatstate': [],
+ 'private_chatstate': [],
+ 'normal_presence': [],
+ 'muc_presence': [],
+ 'send_normal_presence': [],
}
def add_event_handler(self, name, callback, position=0):
@@ -35,7 +43,7 @@ class EventHandler(object):
Add a callback to a given event.
Note that if that event name doesn’t exist, it just returns False.
If it was successfully added, it returns True
- position: 0 means insert a the beginning, -1 means end
+ position: 0 means insert at the beginning, -1 means end
"""
if name not in self.events:
return False
@@ -49,7 +57,7 @@ class EventHandler(object):
def trigger(self, name, *args, **kwargs):
"""
- Call all the callbacks associated to the given event name
+ Call all the callbacks associated to the given event name.
"""
callbacks = self.events[name]
for callback in callbacks: