From a4512cd3ae7294cf8872fd45e4b4783bddd48ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 15 Jan 2021 12:33:18 +0100 Subject: sasl: Use the nick from the presence if the ad-hoc one is not set fix #3450 --- src/irc/irc_client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 1f2a21b..8a64727 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -1371,7 +1371,8 @@ void IrcClient::on_authenticate(const IrcMessage &) auto options = Database::get_irc_server_options(this->bridge.get_bare_jid(), this->get_hostname()); - const auto auth_string = '\0' + options.col() + '\0' + options.col(); + const auto& nick = !options.col().empty() ? options.col() : this->get_own_nick(); + const auto auth_string = '\0' + nick + '\0' + options.col(); const auto base64_auth_string = base64::encode(auth_string); this->send_message({"AUTHENTICATE", {base64_auth_string}}); } -- cgit v1.2.3