aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-05 20:58:37 +0200
committerKim Alvefur <zash@zash.se>2020-10-05 20:58:37 +0200
commit0113f59de04e2ac926e392e6295936e854534883 (patch)
treeb5b6a0a5a5b83691cdf5c60cd2b1050a74c3ee5f /util
parent19549a6976ecd52f9ab080bf02f7aee357441087 (diff)
downloadprosody-0113f59de04e2ac926e392e6295936e854534883.tar.gz
prosody-0113f59de04e2ac926e392e6295936e854534883.zip
util.pluginloader: Look for module libs in mod_plugin/lib.lua
Luarocks can't be told to install something as foo.lib.lua AFAIK, so instead let's try mod_bar/foo.lua
Diffstat (limited to 'util')
-rw-r--r--util/pluginloader.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua
index 5af5084d..8e37ffc4 100644
--- a/util/pluginloader.lua
+++ b/util/pluginloader.lua
@@ -60,6 +60,9 @@ end
local function load_code_ext(plugin, resource, extension, env)
local content, err = load_resource(plugin, resource.."."..extension);
+ if not content and extension == "lib.lua" then
+ content, err = load_resource(plugin, resource..".lua");
+ end
if not content then
content, err = load_resource(resource, resource.."."..extension);
if not content then