Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 9868:0361e3379dd1
mod_admin_telnet: Show module status in module:list()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 19 Mar 2019 09:05:37 +0000 |
parent | 9786:00f7af0be849 |
child | 9974:c30933aa0242 |
comparison
equal
deleted
inserted
replaced
9867:984f27e4b8a3 | 9868:0361e3379dd1 |
---|---|
478 else | 478 else |
479 print(" Host not found"); | 479 print(" Host not found"); |
480 end | 480 end |
481 else | 481 else |
482 for _, name in ipairs(modules) do | 482 for _, name in ipairs(modules) do |
483 print(" "..name); | 483 local status, status_text = modulemanager.get_module(host, name).module:get_status(); |
484 local status_summary = ""; | |
485 if status == "warn" or status == "error" then | |
486 status_summary = (" (%s: %s)"):format(status, status_text); | |
487 end | |
488 print((" %s%s"):format(name, status_summary)); | |
484 end | 489 end |
485 end | 490 end |
486 end | 491 end |
487 end | 492 end |
488 | 493 |