0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

modules/console: Filter error peers by default unless argument.

This commit is contained in:
Jason Volk 2018-04-14 00:51:58 -07:00
parent f4015c597e
commit 428e209995

View file

@ -903,6 +903,11 @@ console_cmd__peer(opt &out, const string_view &line)
if(out.html)
return html__peer(out, line);
const bool all
{
has(line, "all")
};
for(const auto &p : server::peers)
{
using std::setw;
@ -913,6 +918,9 @@ console_cmd__peer(opt &out, const string_view &line)
const auto &peer{*p.second};
const net::ipport &ipp{peer.remote};
if(peer.err_has() && !all)
continue;
out << setw(40) << right << host;
if(ipp)