about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bounce.h1
-rw-r--r--client.c5
-rw-r--r--pounce.11
3 files changed, 7 insertions, 0 deletions
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