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:
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)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue