modulemanager: Add module:set_global() as a cleaner way for a module to declare itself 'global'

Sat, 24 Jan 2009 20:29:25 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 24 Jan 2009 20:29:25 +0000
changeset 746
7027de4c039d
parent 745
5a343599cd3e
child 747
40837f3422ab

modulemanager: Add module:set_global() as a cleaner way for a module to declare itself 'global'

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Sat Jan 24 01:15:40 2009 +0000
+++ b/core/modulemanager.lua	Sat Jan 24 20:29:25 2009 +0000
@@ -259,6 +259,10 @@
 	return self.host;
 end
 
+function api:set_global()
+	self.host = "*";
+end
+
 local function _add_handler(module, origin_type, tag, xmlns, handler)
 	local handlers = stanza_handlers:get(module.host, origin_type, tag, xmlns);
 	local msg = (tag == "iq") and "namespace" or "payload namespace";

mercurial