aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-09 15:02:44 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-09 15:02:44 +0100
commit7896ef03a99c9f848a6301e2b1ee0c762b6268a1 (patch)
tree6c1e38905160e75baf465d8e61887fd94d8747f5 /plugins/mod_admin_telnet.lua
parente6d582da74186eeecf9fb93d1f0e521a02ffdd5b (diff)
downloadprosody-7896ef03a99c9f848a6301e2b1ee0c762b6268a1.tar.gz
prosody-7896ef03a99c9f848a6301e2b1ee0c762b6268a1.zip
mod_admin_telnet: Allow viewing HTTP event listeners via debug:events('http')
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua7
1 files 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