From 666701b0e0a3c72cceea463c2f47c951dcb314eb Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 26 Feb 2020 03:08:11 -0500 Subject: Support batch --- bounce.h | 3 ++- client.c | 5 +++++ pounce.1 | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bounce.h b/bounce.h index 7813284..4718cce 100644 --- a/bounce.h +++ b/bounce.h @@ -68,6 +68,7 @@ static inline struct Message parse(char *line) { X("account-notify", CapAccountNotify) \ X("account-tag", CapAccountTag) \ X("away-notify", CapAwayNotify) \ + X("batch", CapBatch) \ X("causal.agency/passive", CapPassive) \ X("chghost", CapChghost) \ X("extended-join", CapExtendedJoin) \ @@ -83,7 +84,7 @@ enum Cap { #define X(name, id) BIT(id), ENUM_CAP #undef X - TagCaps = CapAccountTag | CapMessageTags | CapServerTime, + TagCaps = CapAccountTag | CapBatch | CapMessageTags | CapServerTime, }; static const char *CapNames[] = { diff --git a/client.c b/client.c index ba5c325..d890cb9 100644 --- a/client.c +++ b/client.c @@ -417,6 +417,10 @@ static const char *filterAwayNotify(const char *line) { return (wordcmp(line, 0, "AWAY") ? line : NULL); } +static const char *filterBatch(const char *line) { + return (wordcmp(line, 0, "BATCH") ? line : NULL); +} + static const char *filterChghost(const char *line) { return (wordcmp(line, 0, "CHGHOST") ? line : NULL); } @@ -475,6 +479,7 @@ static const char *filterTags(const char *line) { static Filter *Filters[] = { [CapAccountNotifyBit] = filterAccountNotify, [CapAwayNotifyBit] = filterAwayNotify, + [CapBatchBit] = filterBatch, [CapChghostBit] = filterChghost, [CapExtendedJoinBit] = filterExtendedJoin, [CapInviteNotifyBit] = filterInviteNotify, diff --git a/pounce.1 b/pounce.1 index be272b5..59e94b6 100644 --- a/pounce.1 +++ b/pounce.1 @@ -340,6 +340,7 @@ is supported: .Sy account-notify , .Sy account-tag , .Sy away-notify , +.Sy batch , .Sy chghost , .Sy extended-join , .Sy invite-notify , -- cgit 1.4.1