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
commit5fa62c1c2a1d7ac5d17526cfdf1d1d6faa8288b2 (patch)
treeddb9bb5de5d29a25e9b5c4fdf1c8e71b5b84b575 /util
parent030787755a2d68fe2e72f28740af730c6f7450d9 (diff)
downloadprosody-5fa62c1c2a1d7ac5d17526cfdf1d1d6faa8288b2.tar.gz
prosody-5fa62c1c2a1d7ac5d17526cfdf1d1d6faa8288b2.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;
};