aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-21 20:00:30 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-21 20:00:30 +0100
commit9792c6566b3416e7aef11bd3628f15ca00418132 (patch)
tree9e935bda53130f60271915acee8ab86215d637da /core/modulemanager.lua
parent6320d988ecc36775611d4a05fb621020329cfc25 (diff)
downloadprosody-9792c6566b3416e7aef11bd3628f15ca00418132.tar.gz
prosody-9792c6566b3416e7aef11bd3628f15ca00418132.zip
modulemanager: Allow loading a module onto "*" (part-fixes #228)
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index f9f3a8b8..f00532a0 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -117,13 +117,15 @@ end
local function do_load_module(host, module_name)
if not (host and module_name) then
return nil, "insufficient-parameters";
- elseif not hosts[host] then
+ elseif not hosts[host] and host ~= "*"then
return nil, "unknown-host";
end
if not modulemap[host] then
modulemap[host] = {};
- hosts[host].modules = modulemap[host];
+ if host ~= "*" then
+ hosts[host].modules = modulemap[host];
+ end
end
if modulemap[host][module_name] then