]> PatchyGit - patchyircd.git/commitdiff
announce SASL mechanisms when using CAP 302
authorEgor <egor@patchysicp.xyz>
Thu, 25 Jan 2024 01:46:23 +0000 (03:46 +0200)
committerEgor <egor@patchysicp.xyz>
Thu, 25 Jan 2024 01:46:23 +0000 (03:46 +0200)
src/irc.c

index d468a41..fcf39ac 100644 (file)
--- a/src/irc.c
+++ b/src/irc.c
@@ -216,7 +216,7 @@ int processPacket(struct client_data *client, char *source, char *command, int a
                                client->caps |= CAP_302;
                        copy_strf(&databuf, ":%s CAP * LS :cap-notify multi-prefix extended-join away-notify invite-notify extended-monitor chghost setname account-notify%s\r\n",
                                        hostname,
-                                       client->umode & UMODE_SECURE ? " sasl" : "");
+                                       client->umode & UMODE_SECURE ? (client->caps & CAP_302 ? " sasl=PLAIN" : " sasl") : "");
                        sendbuf(client);
                        if (!is_registered(client)) {
                                client->regstate = REG_CAPLS;