diff options
author | Adam <adam@sigterm.info> | 2016-03-15 17:40:26 -0500 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2016-03-15 17:40:26 -0500 |
commit | 979027138be9cdc34af5d7247e1ee218715f0d54 (patch) | |
tree | 63f79264cd0d7a3a9771c3693fb8a4230dc815db | |
parent | 176e0e4f37024c3bc56cb1cb39cabe7b1fbe2a9c (diff) | |
parent | 91762524e2de25977fe9a5f5b784ddf03516f562 (diff) |
Merge pull request #155 from SaberUK/2.0+sasl-reauth
Fix logging into accounts with SASL on servers that support reauth.
-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"); } |