Mercurial > prosody-hg
diff plugins/mod_muc.lua @ 1562:2b8674e87a24
mod_muc: Expose rooms table to the host and plugins
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 20 Jul 2009 05:27:59 +0100 |
| parents | 569d58d21612 |
| children |
line wrap: on
line diff
--- a/plugins/mod_muc.lua Sat Jul 18 18:51:04 2009 +0100 +++ b/plugins/mod_muc.lua Mon Jul 20 05:27:59 2009 +0100 @@ -76,6 +76,8 @@ handle_to_domain(origin, stanza); end); +prosody.hosts[module:get_host()].muc = { rooms = rooms }; + module.unload = function() deregister_component(muc_host); end @@ -84,4 +86,5 @@ end module.restore = function(data) rooms = data.rooms or {}; + prosody.hosts[module:get_host()].muc = { rooms = rooms }; end
