diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-05-14 09:38:54 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-05-14 09:38:54 +0100 |
commit | 5ec46c6c37b7145c71d4d1b9aa0bb2ab431a54d6 (patch) | |
tree | b86a1c45fbce3384d59838f15874809dfd441913 /plugins/muc | |
parent | 7a1bd13e64cd25ea15b19a2b72a7bde1c16bf754 (diff) | |
download | prosody-5ec46c6c37b7145c71d4d1b9aa0bb2ab431a54d6.tar.gz prosody-5ec46c6c37b7145c71d4d1b9aa0bb2ab431a54d6.zip |
mod_muc: Fire muc-room-created and muc-room-destroyed events (thanks nik)
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/mod_muc.lua | 1 | ||||
-rw-r--r-- | plugins/muc/muc.lib.lua | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 7861092c..0f1beb0e 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -83,6 +83,7 @@ function create_room(jid) room.route_stanza = room_route_stanza; room.save = room_save; rooms[jid] = room; + module:fire_event("muc-room-created", { room = room }); return room; end diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index a5aba3c8..1ea231f3 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -767,6 +767,7 @@ function room_mt:destroy(newjid, reason, password) self._occupants[nick] = nil; end self:set_persistent(false); + module:fire_event("muc-room-destroyed", { room = self }); end function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc |