summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/events.py4
-rw-r--r--src/tabs.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/events.py b/src/events.py
index e94acb80..8def6cb0 100644
--- a/src/events.py
+++ b/src/events.py
@@ -35,6 +35,10 @@ class EventHandler(object):
'private_chatstate': [],
'normal_presence': [],
'muc_presence': [],
+ 'muc_join': [],
+ 'muc_kick': [],
+ 'muc_nickchange': [],
+ 'muc_ban': [],
'send_normal_presence': [],
}
diff --git a/src/tabs.py b/src/tabs.py
index 55e3154c..17d1e739 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1123,6 +1123,7 @@ class MucTab(ChatTab):
if from_nick not in [user.nick for user in self.users] and typ != "unavailable":
new_user = User(from_nick, affiliation, show, status, role, jid)
self.users.append(new_user)
+ self.core.events.trigger('muc_join', presence, self)
if from_nick == self.own_nick:
self.joined = True
if self.get_name() in self.core.initial_joins:
@@ -1143,14 +1144,18 @@ class MucTab(ChatTab):
user = self.get_user_by_name(from_nick)
# New user
if not user:
+ self.core.events.trigger('muc_join', presence, self)
self.on_user_join(from_nick, affiliation, show, status, role, jid)
# nick change
elif change_nick:
+ self.core.events.trigger('muc_nickchange', presence, self)
self.on_user_nick_change(presence, user, from_nick, from_room)
elif ban:
+ self.core.events.trigger('muc_ban', presence, self)
self.on_user_banned(presence, user, from_nick)
# kick
elif kick:
+ self.core.events.trigger('muc_kick', presence, self)
self.on_user_kicked(presence, user, from_nick)
# user quit
elif typ == 'unavailable':