mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
irc: add option irc.server.*.sasl_disconnect_on_fail (task #12204)
This commit is contained in:
@@ -5089,6 +5089,18 @@ IRC_PROTOCOL_CALLBACK(sasl_end)
|
||||
date, nick, address, host, command,
|
||||
ignored, argc, argv, argv_eol);
|
||||
|
||||
if (strcmp (argv[1], "903") != 0 && IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_SASL_DISCONNECT_ON_FAIL))
|
||||
{
|
||||
/* Check if we are already connected to the server,
|
||||
* to prevent disconnects in case of 907.
|
||||
*/
|
||||
|
||||
if (!server->is_connected)
|
||||
irc_server_disconnect (server, 0, 1);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (!server->is_connected)
|
||||
irc_server_sendf (server, 0, NULL, "CAP END");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user