# HG changeset patch # User Matthew Wild # Date 1248064079 -3600 # Node ID 2b8674e87a24458cb61b8297ff20070128c782bf # Parent 04442f3ebe40c4dfc066835d1b3f213a6eda3e7b mod_muc: Expose rooms table to the host and plugins diff -r 04442f3ebe40 -r 2b8674e87a24 plugins/mod_muc.lua --- 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