mod_admin_telnet: Allow passing list of hosts to http:list()
Lets you select what hosts to list http services on. In particular, this
enables listing global http services, which was not possible before.
--- a/plugins/mod_admin_telnet.lua Mon Feb 24 14:16:45 2020 +0100
+++ b/plugins/mod_admin_telnet.lua Mon Feb 24 18:38:09 2020 +0100
@@ -1241,10 +1241,10 @@
def_env.http = {};
-function def_env.http:list()
+function def_env.http:list(hosts)
local print = self.session.print;
- for host in pairs(prosody.hosts) do
+ for host in get_hosts_set(hosts) do
local http_apps = modulemanager.get_items("http-provider", host);
if #http_apps > 0 then
local http_host = module:context(host):get_option_string("http_host");