summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2022-08-28 15:59:40 +0100
committerPatrick <tingping@tingping.se>2022-09-22 12:07:07 -0500
commit2dbc6adbc23701653e5a32fad42390f461881d7e (patch)
treee1552c0bb798aa5e48aade9431c922bfd3adb6c4 /src
parentbd4290a1a949e444eb1633644f88976e2025b2d8 (diff)
Fix PROTOCTL NAMESX and only send when not using `multi-prefix`.
This capability is the equivalent of the old protoctl token.
Diffstat (limited to 'src')
-rw-r--r--src/common/modes.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/modes.c b/src/common/modes.c
index 756f0858..d8fd75aa 100644
--- a/src/common/modes.c
+++ b/src/common/modes.c
@@ -918,8 +918,12 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data)
 			server_set_encoding (serv, "UTF-8");
 		} else if (g_strcmp0 (tokname, "NAMESX") == 0)
 		{
-									/* 12345678901234567 */
-			tcp_send_len (serv, "PROTOCTL NAMESX\r\n", 17);
+			if (tokadding && !serv->have_namesx)
+			{
+				/* only use protoctl if the server doesn't have the equivalent cap */
+				tcp_send_len (serv, "PROTOCTL NAMESX\r\n", 17);
+				serv->have_namesx = TRUE;
+			}
 		} else if (g_strcmp0 (tokname, "WHOX") == 0)
 		{
 			serv->have_whox = tokadding;