aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modulemanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index e76f2624..f263816b 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -183,8 +183,10 @@ local function do_load_module(host, module_name)
log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name);
api_instance:set_global();
end
- else
- modulemap[host][module_name] = pluginenv;
+ if host ~= api_instance.host and module_has_method(pluginenv, "add_host") then
+ -- Now load the module again onto the host it was originally being loaded on
+ do_load_module(host, module_name);
+ end
end
end
if not ok then