1
0
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:
Max Teufel
2014-11-22 10:08:33 +01:00
parent e460d48d48
commit 78234956b0
4 changed files with 43 additions and 3 deletions
+12
View File
@@ -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");