aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-02 22:01:22 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-02 22:01:22 +0100
commitdda93565feb7be092cbb2b22b29f5c667da94344 (patch)
tree911a6d5b7c374c2fd2dd7439a6d59742ce8a8f4e
parentd3d75a69835b26e31f3e20eb94159b491d02358c (diff)
downloadprosody-dda93565feb7be092cbb2b22b29f5c667da94344.tar.gz
prosody-dda93565feb7be092cbb2b22b29f5c667da94344.zip
modulemanager: Don't load modules when modules_enable is false
-rw-r--r--core/modulemanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index cc48c2f6..2cba50ac 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -53,6 +53,10 @@ local NULL = {};
-- Load modules when a host is activated
function load_modules_for_host(host)
+ if config.get(host, "core", "modules_enable") == false then
+ return; -- Only load for hosts, not components, etc.
+ end
+
-- Load modules from global section
local modules_enabled = config.get("*", "core", "modules_enabled");
local modules_disabled = config.get(host, "core", "modules_disabled");