summaryrefslogtreecommitdiff
path: root/modules/m_sasl.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-02-28 13:22:19 +0000
committerPeter Powell <petpow@saberuk.com>2016-02-28 13:22:19 +0000
commit91762524e2de25977fe9a5f5b784ddf03516f562 (patch)
treec5ed9dc5290adbede3864d77523084181e4bee3a /modules/m_sasl.cpp
parent413b38b1c1b6786d8abce2c77c3c3a7a7e0d3fe9 (diff)
Fix logging into accounts with SASL on servers that support reauth.
Diffstat (limited to 'modules/m_sasl.cpp')
-rw-r--r--modules/m_sasl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp
index 98a554259..ef29a1b45 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");
}