diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-18 18:52:28 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-18 18:52:28 -0400 |
commit | 2e88255cb1faa8bf1974b0ace24c08b89b9eadc7 (patch) | |
tree | fd1842cad7e0018a06d1fc0e261f47410e84659c | |
parent | 557523053f6a5e2d9eb161ca14ab16ec8133407c (diff) | |
download | prosody-2e88255cb1faa8bf1974b0ace24c08b89b9eadc7.tar.gz prosody-2e88255cb1faa8bf1974b0ace24c08b89b9eadc7.zip |
plugins/muc/muc: Add 'muc-occupant-left' event
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 2c9b58d2..9f7b5c70 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -416,6 +416,7 @@ function room_mt:handle_unavailable_to_occupant(origin, stanza) occupant.role = 'none'; self:broadcast_presence(pr, from); self._occupants[current_nick] = nil; + module:fire_event("muc-occupant-left", { room = self; nick = current_nick; }); end return true; end @@ -823,6 +824,7 @@ function room_mt:destroy(newjid, reason, password) self._jid_nick[jid] = nil; end self._occupants[nick] = nil; + module:fire_event("muc-occupant-left", { room = self; nick = nick; }); end self:set_persistent(false); module:fire_event("muc-room-destroyed", { room = self }); |