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;