mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
modules/console: Filter error peers by default unless argument.
This commit is contained in:
parent
f4015c597e
commit
428e209995
1 changed files with 8 additions and 0 deletions
|
@ -903,6 +903,11 @@ console_cmd__peer(opt &out, const string_view &line)
|
||||||
if(out.html)
|
if(out.html)
|
||||||
return html__peer(out, line);
|
return html__peer(out, line);
|
||||||
|
|
||||||
|
const bool all
|
||||||
|
{
|
||||||
|
has(line, "all")
|
||||||
|
};
|
||||||
|
|
||||||
for(const auto &p : server::peers)
|
for(const auto &p : server::peers)
|
||||||
{
|
{
|
||||||
using std::setw;
|
using std::setw;
|
||||||
|
@ -913,6 +918,9 @@ console_cmd__peer(opt &out, const string_view &line)
|
||||||
const auto &peer{*p.second};
|
const auto &peer{*p.second};
|
||||||
const net::ipport &ipp{peer.remote};
|
const net::ipport &ipp{peer.remote};
|
||||||
|
|
||||||
|
if(peer.err_has() && !all)
|
||||||
|
continue;
|
||||||
|
|
||||||
out << setw(40) << right << host;
|
out << setw(40) << right << host;
|
||||||
|
|
||||||
if(ipp)
|
if(ipp)
|
||||||
|
|
Loading…
Reference in a new issue