mirror of
https://github.com/matrix-construct/construct
synced 2024-09-29 20:28:52 +02:00
modules/console: Add reqs optarg to client listing cmd.
This commit is contained in:
parent
3adf45ddc0
commit
5c919d5503
1 changed files with 11 additions and 2 deletions
|
@ -2447,12 +2447,19 @@ console_cmd__client(opt &out, const string_view &line)
|
|||
|
||||
const params param{line, " ",
|
||||
{
|
||||
"[id]",
|
||||
"[reqs|id]",
|
||||
}};
|
||||
|
||||
const bool &reqs
|
||||
{
|
||||
param[0] == "reqs"
|
||||
};
|
||||
|
||||
const auto &idnum
|
||||
{
|
||||
param.at<ulong>(0, 0)
|
||||
!reqs?
|
||||
param.at<ulong>(0, 0):
|
||||
0
|
||||
};
|
||||
|
||||
for(const auto *const &client : ircd::client::list)
|
||||
|
@ -2461,6 +2468,8 @@ console_cmd__client(opt &out, const string_view &line)
|
|||
continue;
|
||||
else if(idnum && client->id > idnum)
|
||||
break;
|
||||
else if(reqs && !client->reqctx)
|
||||
continue;
|
||||
|
||||
out << setw(8) << left << client->id
|
||||
<< " " << right << setw(22) << local(*client)
|
||||
|
|
Loading…
Reference in a new issue