tools/ejabberd2prosody: Fixed private storage export
[prosody.git] / core / modulemanager.lua
index cc48c2f6776ed58cfa29bbdc9408d770a99b01de..6dbc8c53b6fe10cf53d4313631ad1905fde1f497 100644 (file)
@@ -28,7 +28,7 @@ local type = type;
 local next = next;
 local rawget = rawget;
 
-local tostring, print = tostring, print;
+local tostring = tostring;
 
 -- We need this to let modules access the real global namespace
 local _G = _G;
@@ -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");