# HG changeset patch # User Matthew Wild # Date 1552986337 0 # Node ID 0361e3379dd1c7a2a0938b1931e972c3b6fe18e5 # Parent 984f27e4b8a3406e997e7631ce90f5052b854140 mod_admin_telnet: Show module status in module:list() diff -r 984f27e4b8a3 -r 0361e3379dd1 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Tue Mar 19 09:05:15 2019 +0000 +++ b/plugins/mod_admin_telnet.lua Tue Mar 19 09:05:37 2019 +0000 @@ -480,7 +480,12 @@ 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