From 0e519adaadf43bac33ac6caf3d37aed580724ea6 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 27 Feb 2020 02:07:40 -0500 Subject: Support cap-notify --- client.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'client.c') 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, -- cgit 1.4.1