Software /
code /
prosody
Diff
plugins/mod_admin_shell.lua @ 11850:bfa85965106e
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 13 Oct 2021 20:46:04 +0200 |
parent | 11831:94cd363116a3 |
child | 11885:197642f9972f |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Wed Oct 13 10:04:11 2021 +0100 +++ b/plugins/mod_admin_shell.lua Wed Oct 13 20:46:04 2021 +0200 @@ -420,6 +420,7 @@ ["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 @@ 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