From 19299605c1567a8bd9f3621768ead28c0973a674 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Tue, 29 Mar 2022 18:25:12 -0400 Subject: 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. --- client.c | 5 +++-- 1 file 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", -- cgit 1.4.1