diff options
author | Peter Powell <petpow@saberuk.com> | 2016-10-02 12:47:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-10-02 12:47:45 -0400 |
commit | 3af83256c654711fa03d5c3a78d7d126112cc538 (patch) | |
tree | 911dc60288b5289d9b35397dbe6573a4f1af12f1 /modules/sasl.cpp | |
parent | a46c0ca4d813842063840dcead5b3c3b7fd4b070 (diff) |
Fix logging into accounts with SASL on servers that support reauth.
Diffstat (limited to 'modules/sasl.cpp')
-rw-r--r-- | modules/sasl.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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"); } |