aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-26 07:04:59 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-26 07:04:59 +0100
commit45aab93d285912787385d4ee089624d5de71d431 (patch)
tree885c4355a8f4b078d51659d6aa1f164757d2aa69 /core
parent2415fcd5c23fc0d5a4f42078eb96394a10f11872 (diff)
downloadprosody-45aab93d285912787385d4ee089624d5de71d431.tar.gz
prosody-45aab93d285912787385d4ee089624d5de71d431.zip
moduleapi: module:depends(): Don't load shared modules onto the current host if the current host is '*'...
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 1f8c492d..1c676bc3 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -124,7 +124,8 @@ function api:depends(name)
end);
end
local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
- if mod and mod.module.host == "*" and modulemanager.module_has_method(mod, "add_host") then
+ if mod and mod.module.host == "*" and self.host ~= "*"
+ and modulemanager.module_has_method(mod, "add_host") then
mod = nil; -- This is a shared module, so we still want to load it on our host
end
if not mod then