# HG changeset patch # User Matthew Wild # Date 1245635885 -3600 # Node ID d09ecc8ee1ef80c5a6c35eb6d2cf33e00ce81480 # Parent ae88b9dc7890bbe5aceb6d4e41f759b4d5a9699c modulemanager: Call 'load' method when loading a module diff -r ae88b9dc7890 -r d09ecc8ee1ef core/modulemanager.lua --- 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;