Software /
code /
prosody
Changeset
8487:91f6815de26a
moduleapi: Warn if a module being loaded as a dependency has been disabled
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 27 Dec 2017 00:42:57 +0100 |
parents | 8486:c50101b527bf |
children | 8488:95706e0f19fc |
files | core/moduleapi.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Sat Dec 23 06:17:11 2017 +0100 +++ b/core/moduleapi.lua Wed Dec 27 00:42:57 2017 +0100 @@ -161,6 +161,9 @@ 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