From 3af83256c654711fa03d5c3a78d7d126112cc538 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 2 Oct 2016 12:47:45 -0400 Subject: Fix logging into accounts with SASL on servers that support reauth. --- modules/sasl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/sasl.cpp b/modules/sasl.cpp index e31b91d0e..d5a3acf6f 100644 --- a/modules/sasl.cpp +++ b/modules/sasl.cpp @@ -235,7 +235,17 @@ class SASLService : public SASL::Service, public Timer void Succeed(Session *session, NickServ::Account *nc) override { - IRCD->SendSVSLogin(session->uid, nc->GetDisplay()); + // 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->GetDisplay()); + } this->SendMessage(session, "D", "S"); } -- cgit