# HG changeset patch # User Matthew Wild # Date 1539093764 -3600 # Node ID 6780049be177918327477cb27029df51a600b8ed # Parent b6cdadb1175d1eba280e00995944e9deb7a4b1a8 mod_admin_telnet: Allow viewing HTTP event listeners via debug:events('http') diff -r b6cdadb1175d -r 6780049be177 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Tue Oct 09 15:01:34 2018 +0100 +++ b/plugins/mod_admin_telnet.lua Tue Oct 09 15:02:44 2018 +0100 @@ -1143,10 +1143,13 @@ function def_env.debug:events(host, event) local events_obj; if host and host ~= "*" then - if not prosody.hosts[host] then + if host == "http" then + events_obj = require "net.http.server"._events; + elseif not prosody.hosts[host] then return false, "Unknown host: "..host; + else + events_obj = prosody.hosts[host].events; end - events_obj = prosody.hosts[host].events; else events_obj = prosody.events; end