aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-01-24 20:29:25 +0000
committerMatthew Wild <mwild1@gmail.com>2009-01-24 20:29:25 +0000
commit9b0ee1a5fb2abb96ef4c34b4ff5043201033984f (patch)
treea1bcf754fc8780a27f11d37b93dd5789356a0df3 /core
parentf3ccd47096b0e15653254e684d5faa54a508fc1a (diff)
downloadprosody-9b0ee1a5fb2abb96ef4c34b4ff5043201033984f.tar.gz
prosody-9b0ee1a5fb2abb96ef4c34b4ff5043201033984f.zip
modulemanager: Add module:set_global() as a cleaner way for a module to declare itself 'global'
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 817b5dde..5305e5c6 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -259,6 +259,10 @@ function api:get_host()
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";