aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-14 21:03:59 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-14 21:03:59 +0500
commit376256439e0f9db51a6a81dd7091dc7ef1d585f8 (patch)
treebee423f30f222d9ac89fdcf07b0e6fd2a97accbd /core
parent84d3a71ab244b5b0cf982c2e041d85a06fd1bfa4 (diff)
downloadprosody-376256439e0f9db51a6a81dd7091dc7ef1d585f8.tar.gz
prosody-376256439e0f9db51a6a81dd7091dc7ef1d585f8.zip
modulemanager: Changed to use util.pluginloader
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 601c00d9..94cecee4 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -18,6 +18,7 @@ local config = require "core.configmanager";
local multitable_new = require "util.multitable".new;
local register_actions = require "core.actions".register;
local st = require "util.stanza";
+local pluginloader = require "util.pluginloader";
local hosts = hosts;
local prosody = prosody;
@@ -113,7 +114,7 @@ function load(host, module_name, config)
end
- local mod, err = loadfile(get_module_filename(module_name));
+ local mod, err = pluginloader.load_code(module_name);
if not mod then
log("error", "Unable to load module '%s': %s", module_name or "nil", err or "nil");
return nil, err;
@@ -187,7 +188,7 @@ function reload(host, name, ...)
local mod = get_module(host, name);
if not mod then return nil, "module-not-loaded"; end
- local _mod, err = loadfile(get_module_filename(name)); -- checking for syntax errors
+ local _mod, err = pluginloader.load_code(name); -- checking for syntax errors
if not _mod then
log("error", "Unable to load module '%s': %s", module_name or "nil", err or "nil");
return nil, err;