Software /
code /
prosody
Changeset
9454:6780049be177
mod_admin_telnet: Allow viewing HTTP event listeners via debug:events('http')
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 09 Oct 2018 15:02:44 +0100 |
parents | 9453:b6cdadb1175d |
children | 9455:c62c983b8be3 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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