diff options
author | Peter Powell <petpow@saberuk.com> | 2016-02-28 13:22:19 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-02-28 13:22:19 +0000 |
commit | 91762524e2de25977fe9a5f5b784ddf03516f562 (patch) | |
tree | c5ed9dc5290adbede3864d77523084181e4bee3a /modules/m_sasl.cpp | |
parent | 413b38b1c1b6786d8abce2c77c3c3a7a7e0d3fe9 (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.cpp | 12 |
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"); } |