From e418f8a9c642c2b0c1ab06160441de068350ac72 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 22 Jun 2009 02:58:05 +0100 Subject: modulemanager: Call 'load' method when loading a module --- core/modulemanager.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/modulemanager.lua') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index d6220cec..c7aa5cce 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -134,6 +134,13 @@ function load(host, module_name, config) 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; -- cgit v1.2.3