From 5c919d5503fb0c6ef83d0e6ae3e6ccac9c826c72 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 10 Jun 2018 23:07:20 -0700 Subject: [PATCH] modules/console: Add reqs optarg to client listing cmd. --- modules/console.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/console.cc b/modules/console.cc index a6c9f09a2..69eaafef8 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -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(0, 0) + !reqs? + param.at(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)