about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-03-29 18:25:12 -0400
committerJune McEnroe <june@causal.agency>2022-03-29 18:35:04 -0400
commit19299605c1567a8bd9f3621768ead28c0973a674 (patch)
tree108d7a0ad9bb44e12a5ae9057795304b8da246ab
parentTrack account name from 900 numeric (diff)
downloadpounce-19299605c1567a8bd9f3621768ead28c0973a674.tar.gz
pounce-19299605c1567a8bd9f3621768ead28c0973a674.zip
Send real account name in fake 900
This only exists in case of clients that won't use a TLS client
cert without trying to use SASL EXTERNAL. Honestly I'm not sure if
they actually exist. But if they do, they might be happier to receive
the real account name afterwards.
Diffstat (limited to '')
-rw-r--r--client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.c b/client.c
index e364a5a..6b75681 100644
--- a/client.c
+++ b/client.c
@@ -260,9 +260,10 @@ static void handleAuthenticate(struct Client *client, struct Message *msg) {
 	if (cert && !strcmp(msg->params[0], "EXTERNAL")) {
 		clientFormat(client, "AUTHENTICATE +\r\n");
 	} else if (cert && !strcmp(msg->params[0], "+")) {
+		const char *account = (stateAccount ? stateAccount : "*");
 		clientFormat(
-			client, ":%s 900 * %s * :You are now logged in as *\r\n",
-			clientOrigin, stateEcho()
+			client, ":%s 900 * %s %s :You are now logged in as %s\r\n",
+			clientOrigin, stateEcho(), account, account
 		);
 		clientFormat(
 			client, ":%s 903 * :SASL authentication successful\r\n",