aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_shell.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-10-13 20:46:04 +0200
committerKim Alvefur <zash@zash.se>2021-10-13 20:46:04 +0200
commite1d1be0068891c7815588ec27ce07c828ec7e04c (patch)
tree232b401095548f527397933618e60d2dcca0447f /plugins/mod_admin_shell.lua
parent21eeadecc7c94a07ea1ebdb1666dd40fa2ea8a9d (diff)
downloadprosody-e1d1be0068891c7815588ec27ce07c828ec7e04c.tar.gz
prosody-e1d1be0068891c7815588ec27ce07c828ec7e04c.zip
mod_admin_shell: Show HTTP base-URLs in module:info()
Because it's nice, not having to find it in http:list(), which could have a lot of items.
Diffstat (limited to 'plugins/mod_admin_shell.lua')
-rw-r--r--plugins/mod_admin_shell.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index d44f4635..5e675e93 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -420,6 +420,7 @@ function def_env.module:info(name, hosts)
["adhoc-provider"] = function(item) return item.name; end,
["auth-provider"] = function(item) return item.name; end,
["storage-provider"] = function(item) return item.name; end,
+ ["http-provider"] = function(item, mod) return mod:http_url(item.name); end,
};
for host in hosts do
@@ -441,7 +442,7 @@ function def_env.module:info(name, hosts)
local formatter = item_formatters[kind];
if formatter then
for _, item in ipairs(items) do
- print(" - " .. formatter(item));
+ print(" - " .. formatter(item, mod.module));
end
end
end