summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-26 03:15:14 -0500
committerJune McEnroe <june@causal.agency>2020-02-26 03:15:14 -0500
commitfe0d18a3a9fe27d56f8551c5fe91aeca5e1b415b (patch)
tree0449eb94db7345c7356e4b4a218a2e92e80787bc
parentSupport batch (diff)
downloadpounce-fe0d18a3a9fe27d56f8551c5fe91aeca5e1b415b.tar.gz
pounce-fe0d18a3a9fe27d56f8551c5fe91aeca5e1b415b.zip
Support labeled-response
-rw-r--r--bounce.h7
-rw-r--r--client.c5
-rw-r--r--pounce.11
3 files changed, 12 insertions, 1 deletions
diff --git a/bounce.h b/bounce.h
index 4718cce..e87d7bb 100644
--- a/bounce.h
+++ b/bounce.h
@@ -73,6 +73,7 @@ static inline struct Message parse(char *line) {
 	X("chghost", CapChghost) \
 	X("extended-join", CapExtendedJoin) \
 	X("invite-notify", CapInviteNotify) \
+	X("labeled-response", CapLabeledResponse) \
 	X("message-tags", CapMessageTags) \
 	X("multi-prefix", CapMultiPrefix) \
 	X("sasl", CapSASL) \
@@ -84,7 +85,11 @@ enum Cap {
 #define X(name, id) BIT(id),
 	ENUM_CAP
 #undef X
-	TagCaps = CapAccountTag | CapBatch | CapMessageTags | CapServerTime,
+	TagCaps = CapAccountTag
+		| CapBatch
+		| CapLabeledResponse
+		| CapMessageTags
+		| CapServerTime,
 };
 
 static const char *CapNames[] = {
diff --git a/client.c b/client.c
index d890cb9..61cd7d0 100644
--- a/client.c
+++ b/client.c
@@ -437,6 +437,10 @@ static const char *filterInviteNotify(const char *line) {
 	return (wordcmp(line, 1, stateNick()) ? NULL : line);
 }
 
+static const char *filterLabeledResponse(const char *line) {
+	return (wordcmp(line, 0, "ACK") ? line : NULL);
+}
+
 static const char *filterMessageTags(const char *line) {
 	return (wordcmp(line, 0, "TAGMSG") ? line : NULL);
 }
@@ -483,6 +487,7 @@ static Filter *Filters[] = {
 	[CapChghostBit] = filterChghost,
 	[CapExtendedJoinBit] = filterExtendedJoin,
 	[CapInviteNotifyBit] = filterInviteNotify,
+	[CapLabeledResponseBit] = filterLabeledResponse,
 	[CapMessageTagsBit] = filterMessageTags,
 	[CapMultiPrefixBit] = filterMultiPrefix,
 	[CapUserhostInNamesBit] = filterUserhostInNames,
diff --git a/pounce.1 b/pounce.1
index 59e94b6..470324d 100644
--- a/pounce.1
+++ b/pounce.1
@@ -344,6 +344,7 @@ is supported:
 .Sy chghost ,
 .Sy extended-join ,
 .Sy invite-notify ,
+.Sy labeled-response ,
 .Sy message-tags ,
 .Sy multi-prefix ,
 .Sy server-time ,
2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe This is so embarrassing. It only started crashing once it had strings that were long enough, and then it took me so long to notice this mistake. I was worried I was still doing va_list wrong somehow. 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe vaswprintf is a nightmare. 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe This is actually possible with use_default_colors! 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe Fall back to using bold if there are only 8 colors. This also allowed bright background colors in 16-color terminals. I must port this system to torus. I'll be able to remove the awful termcap patch hack. 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe Oh boy that's embarrassing. 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe Don't really have a way to implement the M-* keys, and currently missing C-w. 2018-08-04Handle /topicJune McEnroe