aboutsummaryrefslogtreecommitdiffstats
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
commitd684b288de7ac00a0e12795cc3fb8f02bfed1217 (patch)
tree78ad49303932d4ddc27a6fe2f175b16b200c35fc
parent958b92cc3a56ad4cb4fe8d1549bf611df6d633e6 (diff)
downloadprosody-d684b288de7ac00a0e12795cc3fb8f02bfed1217.tar.gz
prosody-d684b288de7ac00a0e12795cc3fb8f02bfed1217.zip
mod_admin_telnet: Show module status in module:list()
-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