aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2019-03-19 09:05:37 +0000
committerMatthew Wild <mwild1@gmail.com>2019-03-19 09:05:37 +0000
commitab545f19a339c76afe6d24912a79e05ee5f4d94c (patch)
tree78ad49303932d4ddc27a6fe2f175b16b200c35fc /plugins/mod_admin_telnet.lua
parentcf15c2a1e0ddada23688ad289a5b407a334d61e1 (diff)
downloadprosody-ab545f19a339c76afe6d24912a79e05ee5f4d94c.tar.gz
prosody-ab545f19a339c76afe6d24912a79e05ee5f4d94c.zip
mod_admin_telnet: Show module status in module:list()
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua7
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