Mon, 22 Jun 2009 02:58:05 +0100
modulemanager: Call 'load' method when loading a module
core/modulemanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/modulemanager.lua Sat Jun 20 22:50:38 2009 +0100 +++ b/core/modulemanager.lua Mon Jun 22 02:58:05 2009 +0100 @@ -134,6 +134,13 @@ return nil, ret; end + if module_has_method(pluginenv, "load") then + local ok, err = call_module_method(pluginenv, "load"); + if (not ok) and err then + log("warn", "Error loading module '%s' on '%s': %s", module_name, host, err); + end + end + -- Use modified host, if the module set one modulemap[api_instance.host][module_name] = pluginenv;