# HG changeset patch # User João Duarte # Date 1563992435 25200 # Node ID f343ed1f02fdaebfbbc21f298dce16e1d30451e9 # Parent 4d1206ac0d41f809f9706fb56f81be381bbf7ef1 util.prosodyctl: Created the helper function get_path_custom_plugins diff -r 4d1206ac0d41 -r f343ed1f02fd util/prosodyctl.lua --- a/util/prosodyctl.lua Wed Jul 24 10:48:20 2019 -0700 +++ b/util/prosodyctl.lua Wed Jul 24 11:20:35 2019 -0700 @@ -288,6 +288,14 @@ 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 @@ start = start; stop = stop; reload = reload; + get_path_custom_plugins = get_path_custom_plugins; };