about summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/client.c b/client.c
index c472f51..2d5b8e0 100644
--- a/client.c
+++ b/client.c
@@ -421,6 +421,13 @@ static const char *filterBatch(const char *line) {
 	return (wordcmp(line, 0, "BATCH") ? line : NULL);
 }
 
+static const char *filterCapNotify(const char *line) {
+	if (wordcmp(line, 0, "CAP")) return line;
+	if (!wordcmp(line, 1, "NEW")) return NULL;
+	if (!wordcmp(line, 1, "DEL")) return NULL;
+	return line;
+}
+
 static const char *filterChghost(const char *line) {
 	return (wordcmp(line, 0, "CHGHOST") ? line : NULL);
 }
@@ -488,6 +495,7 @@ static Filter *Filters[] = {
 	[CapAccountNotifyBit] = filterAccountNotify,
 	[CapAwayNotifyBit] = filterAwayNotify,
 	[CapBatchBit] = filterBatch,
+	[CapCapNotifyBit] = filterCapNotify,
 	[CapChghostBit] = filterChghost,
 	[CapExtendedJoinBit] = filterExtendedJoin,
 	[CapInviteNotifyBit] = filterInviteNotify,