Changeset

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 1561:04442f3ebe40
children 1566:9edeef1ad4f1
files plugins/mod_muc.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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