From e7d4ae6aacbdf7cf6a5daa9e48e3d260f906875a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 9 Oct 2018 15:02:44 +0100 Subject: mod_admin_telnet: Allow viewing HTTP event listeners via debug:events('http') --- plugins/mod_admin_telnet.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 828e85f4..1cbe27a4 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -1143,10 +1143,13 @@ end 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 -- cgit v1.2.3