0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 14:58:20 +02:00

modules/console: Add reqs optarg to client listing cmd.

This commit is contained in:
Jason Volk 2018-06-10 23:07:20 -07:00
parent 3adf45ddc0
commit 5c919d5503

View file

@ -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)