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
Diffstat (limited to '')
-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 ,
b98c272257c6045cf795f0b5e37&follow=1'>Set cursor theme and sizeJune McEnroe 2021-02-07Use scrot for up -s if no screencaptureJune McEnroe 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe