X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fmodulemanager.lua;h=6dbc8c53b6fe10cf53d4313631ad1905fde1f497;hb=34215744d79b2fcf146b69a59007d104085dff4a;hp=cc48c2f6776ed58cfa29bbdc9408d770a99b01de;hpb=94281e55a6ba755afa3143fc40575e7ad9c0df5e;p=prosody.git diff --git a/core/modulemanager.lua b/core/modulemanager.lua index cc48c2f6..6dbc8c53 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -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");