aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-02-20 20:11:52 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-02-20 20:11:52 +0500
commit2a37446dfa25d0f9ce7fca9d09e660c83e32fbb7 (patch)
tree3a167180e857db9b80547be3ab6c5a9bd2b7e9fe /util
parentfca75eb761a18d339035e6a1455a6d80baa5e93d (diff)
downloadprosody-2a37446dfa25d0f9ce7fca9d09e660c83e32fbb7.tar.gz
prosody-2a37446dfa25d0f9ce7fca9d09e660c83e32fbb7.zip
util.pluginloader: Remove unused support for custom loaders, to simplify further refactoring.
Diffstat (limited to 'util')
-rw-r--r--util/pluginloader.lua14
1 files changed, 5 insertions, 9 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua
index 9300b98a..3a4e8003 100644
--- a/util/pluginloader.lua
+++ b/util/pluginloader.lua
@@ -32,28 +32,24 @@ local function load_file(name)
return content, path;
end
-function load_resource(plugin, resource, loader)
+function load_resource(plugin, resource)
local path, name = plugin:match("([^/]*)/?(.*)");
if name == "" then
if not resource then
resource = "mod_"..plugin..".lua";
end
- loader = loader or load_file;
- local content, err = loader(plugin.."/"..resource);
- if not content then content, err = loader(resource); end
- -- TODO add support for packed plugins
+ local content, err = load_file(plugin.."/"..resource);
+ if not content then content, err = load_file(resource); end
return content, err;
else
if not resource then
resource = "mod_"..name..".lua";
end
- loader = loader or load_file;
- local content, err = loader(plugin.."/"..resource);
- if not content then content, err = loader(path.."/"..resource); end
- -- TODO add support for packed plugins
+ local content, err = load_file(plugin.."/"..resource);
+ if not content then content, err = load_file(path.."/"..resource); end
return content, err;
end