diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-23 14:15:07 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-23 14:15:07 +0100 |
commit | 1e7d11c689a927e9730a101f2f9050b84eb5216e (patch) | |
tree | 990d4b17fb3959ce42fe3bc2d34f5c87514dc4c9 /core/moduleapi.lua | |
parent | c4ff9b7e1086e93be9320dd0cdd8aebf7df2b4ad (diff) | |
download | prosody-1e7d11c689a927e9730a101f2f9050b84eb5216e.tar.gz prosody-1e7d11c689a927e9730a101f2f9050b84eb5216e.zip |
moduleapi: module:depends(): Load shared modules onto the current host even if they are loaded globally already
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r-- | core/moduleapi.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 2223f4d0..e680f615 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -120,6 +120,9 @@ 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 + mod = nil; -- This is a shared module, so we still want to load it on our host + end if not mod then local err; mod, err = modulemanager.load(self.host, name); |