aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-27 00:42:57 +0100
committerKim Alvefur <zash@zash.se>2017-12-27 00:42:57 +0100
commit9f6611dab7e35dede36be944dada836dd162b73c (patch)
tree8b21e907d19f6ac68d599202ac56e066391ba4da /core
parent42af1f532ad5fda317eeb17d1001c995b1dd3d42 (diff)
downloadprosody-9f6611dab7e35dede36be944dada836dd162b73c.tar.gz
prosody-9f6611dab7e35dede36be944dada836dd162b73c.zip
moduleapi: Warn if a module being loaded as a dependency has been disabled
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index e39fd026..2eae35fc 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -161,6 +161,9 @@ function api:depends(name)
end
end);
end
+ if self:get_option_inherited_set("modules_disabled", {}):contains(name) then
+ self:log("warn", "Loading prerequisite mod_%s despite it being disabled", name);
+ end
local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
if mod and mod.module.host == "*" and self.host ~= "*"
and modulemanager.module_has_method(mod, "add_host") then