diff options
author | João Duarte <jvsDuarte08@gmail.com> | 2019-07-24 11:20:35 -0700 |
---|---|---|
committer | João Duarte <jvsDuarte08@gmail.com> | 2019-07-24 11:20:35 -0700 |
commit | 52f963350f11ac6317bcf2ac1e184a6c0f7b9c68 (patch) | |
tree | ddb9bb5de5d29a25e9b5c4fdf1c8e71b5b84b575 | |
parent | f1a27b4554175c04fbd3c5ffedbc5b9e6ad40967 (diff) | |
download | prosody-52f963350f11ac6317bcf2ac1e184a6c0f7b9c68.tar.gz prosody-52f963350f11ac6317bcf2ac1e184a6c0f7b9c68.zip |
util.prosodyctl: Created the helper function get_path_custom_plugins
-rw-r--r-- | util/prosodyctl.lua | 9 |
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; }; |