summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 54b1ac7b3..a4eba464d 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -571,6 +571,10 @@ IRC_PROTOCOL_CALLBACK(authenticate)
IRC_PLUGIN_NAME,
sasl_error);
}
+ else
+ {
+ server->sasl_mechanism_used = sasl_mechanism;
+ }
irc_server_sendf (server, 0, NULL, "AUTHENTICATE %s", answer);
free (answer);
}
@@ -7281,6 +7285,8 @@ IRC_PROTOCOL_CALLBACK(sasl_end_ok)
IRC_PROTOCOL_RUN_CALLBACK(numeric);
+ server->authentication_method = IRC_SERVER_AUTH_METHOD_SASL;
+
if (!server->is_connected)
irc_server_sendf (server, 0, NULL, "CAP END");
@@ -7306,6 +7312,9 @@ IRC_PROTOCOL_CALLBACK(sasl_end_fail)
server->hook_timer_sasl = NULL;
}
+ server->authentication_method = IRC_SERVER_AUTH_METHOD_NONE;
+ server->sasl_mechanism_used = -1;
+
IRC_PROTOCOL_RUN_CALLBACK(numeric);
sasl_fail = IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_SASL_FAIL);