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 ,
'> 2021-01-13Add hilex example to htagml manualJune McEnroe 2021-01-12Style causal.agency like bin HTMLJune McEnroe 2021-01-12Avoid matching tag text inside HTML elementsJune McEnroe 2021-01-12Use hilex for up -hJune McEnroe 2021-01-12Use hilex for bin HTMLJune McEnroe 2021-01-12Don't output a pre in hilex by defaultJune McEnroe 2021-01-12Move hilex out of hilex directoryJune McEnroe 2021-01-12Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe God that makes the lexers so much simpler. 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe This simplifies some things, adds support for line number tag definitions, and should enable combining htagml with other preprocessors in the future. 2021-01-12Split fields by tab onlyJune McEnroe Also don't fail hard on non-forward-search definitions. 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe