summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-30 17:52:39 -0400
committerJune McEnroe <june@causal.agency>2020-09-30 17:52:39 -0400
commit3e67bf6557861a58d75f62c562a3a2b43f226435 (patch)
treeaada4c6bc2a93a0479b02009ec5c8cf3163eb0a4 /command.c
parentAllow 2-param form of /whois, count comma-separated nicks (diff)
downloadcatgirl-3e67bf6557861a58d75f62c562a3a2b43f226435.tar.gz
catgirl-3e67bf6557861a58d75f62c562a3a2b43f226435.zip
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.
Diffstat (limited to 'command.c')
-rw-r--r--command.c7
1 files changed, 7 insertions, 0 deletions
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(&params, " ");
@@ -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 },
indexed and add palette samplingJune McEnroe 2018-02-05Take scale into account for when to stop drawing in gfxxJune McEnroe 2018-02-05Always skip most significant bits in gfxxJune McEnroe 2018-02-05Set title in gfcocoaJune McEnroe 2018-02-05Double-buffer gfb frontendJune McEnroe 2018-02-05Rewrite gfxx bit handlingJune McEnroe 2018-02-05Add flip option to gfxxJune McEnroe 2018-02-05Remove gfxx reverse optionJune McEnroe 2018-02-04Fix gfxx draw stop conditionJune McEnroe 2018-02-04Reuse CGColorSpace and CGDataProvider in gfcocoaJune McEnroe 2018-02-04Mark mac target phonyJune McEnroe 2018-02-04Set up Makefile for gfxx-cocoa or gfxx-fbJune McEnroe 2018-02-04Avoid doing excessive work in gfxxJune McEnroe 2018-02-04Handle window resizing in gfcocoaJune McEnroe 2018-02-04Set cinoptionsJune McEnroe 2018-02-04Tweak colorscheme moreJune McEnroe 2018-02-04Color MatchParen DarkYellowJune McEnroe 2018-02-04Add palette sampling to gfxxJune McEnroe 2018-02-04Add 4-bit RGB to gfxxJune McEnroe 2018-02-04Add Quit menu item to gfcocoaJune McEnroe 2018-02-04Switch back to sane Objective-C styleJune McEnroe 2018-02-04Quit gfcocoa when window closesJune McEnroe 2018-02-03Apparently this is how people write Objective-CJune McEnroe