From 91762524e2de25977fe9a5f5b784ddf03516f562 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 28 Feb 2016 13:22:19 +0000 Subject: [PATCH] Fix logging into accounts with SASL on servers that support reauth. --- modules/m_sasl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index 98a554259e..ef29a1b45a 100644 --- a/modules/m_sasl.cpp +++ b/modules/m_sasl.cpp @@ -223,7 +223,17 @@ class SASLService : public SASL::Service, public Timer void Succeed(Session *session, NickCore *nc) anope_override { - IRCD->SendSVSLogin(session->uid, nc->display); + // If the user is already introduced then we log them in now. + // Otherwise, we send an SVSLOGIN to log them in later. + User *user = User::Find(session->uid); + if (user) + { + user->Login(nc); + } + else + { + IRCD->SendSVSLogin(session->uid, nc->display); + } this->SendMessage(session, "D", "S"); }