diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-06-22 02:58:05 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-06-22 02:58:05 +0100 |
commit | e418f8a9c642c2b0c1ab06160441de068350ac72 (patch) | |
tree | 14a8850f5b2d4ffeef6ef5b63f1fca597bb38092 /core | |
parent | 0f51eb5fa1f49a1a094e291528bf954c63dfadfd (diff) | |
download | prosody-e418f8a9c642c2b0c1ab06160441de068350ac72.tar.gz prosody-e418f8a9c642c2b0c1ab06160441de068350ac72.zip |
modulemanager: Call 'load' method when loading a module
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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; |