From b95a1a48f4abb2a14dbbd55d5bfbdd0350f31e1c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 20 Jul 2009 05:27:59 +0100 Subject: mod_muc: Expose rooms table to the host and plugins --- plugins/mod_muc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_muc.lua b/plugins/mod_muc.lua index e99ef83c..b38468ea 100644 --- a/plugins/mod_muc.lua +++ b/plugins/mod_muc.lua @@ -76,6 +76,8 @@ component = register_component(muc_host, function(origin, stanza) 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 @@ module.save = function() end module.restore = function(data) rooms = data.rooms or {}; + prosody.hosts[module:get_host()].muc = { rooms = rooms }; end -- cgit v1.2.3