From 3e67bf6557861a58d75f62c562a3a2b43f226435 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 30 Sep 2020 17:52:39 -0400 Subject: Add /ops command It's pretty awkward with large channels since NAMES isn't sorted by prefixes or anything... But having it accumulate names across many replies would require more reworking. --- command.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index 0d988cd..efc095c 100644 --- a/command.c +++ b/command.c @@ -174,6 +174,12 @@ static void commandNames(uint id, char *params) { replies.names++; } +static void commandOps(uint id, char *params) { + (void)params; + ircFormat("NAMES %s\r\n", idNames[id]); + replies.ops++; +} + static void commandInvite(uint id, char *params) { if (!params) return; char *nick = strsep(¶ms, " "); @@ -468,6 +474,7 @@ static const struct Handler { { "/o", commandOpen, Restricted }, { "/op", commandOp, 0 }, { "/open", commandOpen, Restricted }, + { "/ops", commandOps, 0 }, { "/part", commandPart, 0 }, { "/query", commandQuery, Restricted }, { "/quit", commandQuit, 0 }, -- cgit 1.4.1