aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-07-24 11:20:35 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-07-24 11:20:35 -0700
commit52f963350f11ac6317bcf2ac1e184a6c0f7b9c68 (patch)
treeddb9bb5de5d29a25e9b5c4fdf1c8e71b5b84b575 /util
parentf1a27b4554175c04fbd3c5ffedbc5b9e6ad40967 (diff)
downloadprosody-52f963350f11ac6317bcf2ac1e184a6c0f7b9c68.tar.gz
prosody-52f963350f11ac6317bcf2ac1e184a6c0f7b9c68.zip
util.prosodyctl: Created the helper function get_path_custom_plugins
Diffstat (limited to 'util')
-rw-r--r--util/prosodyctl.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index 5e19937e..fbeb9540 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -288,6 +288,14 @@ local function reload()
return true;
end
+local function get_path_custom_plugins(plugin_paths)
+ -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now
+ -- luacheck: ignore 512
+ for path in plugin_paths:gmatch("[^;]+") do
+ return path
+ end
+end
+
return {
show_message = show_message;
show_warning = show_message;
@@ -308,4 +316,5 @@ return {
start = start;
stop = stop;
reload = reload;
+ get_path_custom_plugins = get_path_custom_plugins;
};