core/moduleapi.lua
changeset 8490 91f6815de26a
parent 7985 e30b0cbed472
child 8536 66cdf5c7af85
equal deleted inserted replaced
8489:c50101b527bf 8490:91f6815de26a
   159 				self:log("info", "Auto-unloading due to unload of %s:%s", event.host, event.module);
   159 				self:log("info", "Auto-unloading due to unload of %s:%s", event.host, event.module);
   160 				modulemanager.unload(self.host, self.name);
   160 				modulemanager.unload(self.host, self.name);
   161 			end
   161 			end
   162 		end);
   162 		end);
   163 	end
   163 	end
       
   164 	if self:get_option_inherited_set("modules_disabled", {}):contains(name) then
       
   165 		self:log("warn", "Loading prerequisite mod_%s despite it being disabled", name);
       
   166 	end
   164 	local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
   167 	local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
   165 	if mod and mod.module.host == "*" and self.host ~= "*"
   168 	if mod and mod.module.host == "*" and self.host ~= "*"
   166 	and modulemanager.module_has_method(mod, "add_host") then
   169 	and modulemanager.module_has_method(mod, "add_host") then
   167 		mod = nil; -- Target is a shared module, so we still want to load it on our host
   170 		mod = nil; -- Target is a shared module, so we still want to load it on our host
   168 	end
   171 	end