diff options
author | Matthew Wild <mwild1@gmail.com> | 2019-03-19 09:05:37 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2019-03-19 09:05:37 +0000 |
commit | d684b288de7ac00a0e12795cc3fb8f02bfed1217 (patch) | |
tree | 78ad49303932d4ddc27a6fe2f175b16b200c35fc | |
parent | 958b92cc3a56ad4cb4fe8d1549bf611df6d633e6 (diff) | |
download | prosody-d684b288de7ac00a0e12795cc3fb8f02bfed1217.tar.gz prosody-d684b288de7ac00a0e12795cc3fb8f02bfed1217.zip |
mod_admin_telnet: Show module status in module:list()
-rw-r--r-- | plugins/mod_admin_telnet.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 7fae8983..34cc4dc6 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -480,7 +480,12 @@ function def_env.module:list(hosts) end else for _, name in ipairs(modules) do - print(" "..name); + local status, status_text = modulemanager.get_module(host, name).module:get_status(); + local status_summary = ""; + if status == "warn" or status == "error" then + status_summary = (" (%s: %s)"):format(status, status_text); + end + print((" %s%s"):format(name, status_summary)); end end end |