From 348dd564a15ae8dd5aee6a60805a44bd95e73f5b Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 26 Feb 2020 03:20:59 -0500 Subject: Support setname --- bounce.h | 1 + client.c | 5 +++++ pounce.1 | 1 + 3 files changed, 7 insertions(+) diff --git a/bounce.h b/bounce.h index e87d7bb..a4b1a91 100644 --- a/bounce.h +++ b/bounce.h @@ -78,6 +78,7 @@ static inline struct Message parse(char *line) { X("multi-prefix", CapMultiPrefix) \ X("sasl", CapSASL) \ X("server-time", CapServerTime) \ + X("setname", CapSetname) \ X("userhost-in-names", CapUserhostInNames) \ X("", CapUnsupported) diff --git a/client.c b/client.c index 61cd7d0..c472f51 100644 --- a/client.c +++ b/client.c @@ -464,6 +464,10 @@ static const char *filterMultiPrefix(const char *line) { } } +static const char *filterSetname(const char *line) { + return (wordcmp(line, 0, "SETNAME") ? line : NULL); +} + static const char *filterUserhostInNames(const char *line) { if (wordcmp(line, 0, "353")) return line; static regex_t regex; @@ -490,6 +494,7 @@ static Filter *Filters[] = { [CapLabeledResponseBit] = filterLabeledResponse, [CapMessageTagsBit] = filterMessageTags, [CapMultiPrefixBit] = filterMultiPrefix, + [CapSetnameBit] = filterSetname, [CapUserhostInNamesBit] = filterUserhostInNames, }; diff --git a/pounce.1 b/pounce.1 index 470324d..58a0532 100644 --- a/pounce.1 +++ b/pounce.1 @@ -348,6 +348,7 @@ is supported: .Sy message-tags , .Sy multi-prefix , .Sy server-time , +.Sy setname , .Sy userhost-in-names . . .Pp -- cgit 1.4.1