summaryrefslogtreecommitdiff
path: root/modules/m_sasl.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /modules/m_sasl.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/m_sasl.cpp')
-rw-r--r--modules/m_sasl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp
index e38e865ff..67c1148ee 100644
--- a/modules/m_sasl.cpp
+++ b/modules/m_sasl.cpp
@@ -40,10 +40,10 @@ class Plain : public Mechanism
Anope::string acc = decoded.substr(0, p),
pass = decoded.substr(p + 1);
- if (acc.empty() || pass.empty())
+ if (acc.empty() || pass.empty() || !NickServ::service)
return;
- SASL::IdentifyRequest *req = new SASL::IdentifyRequest(this->owner, m.source, acc, pass);
+ NickServ::IdentifyRequest *req = NickServ::service->CreateIdentifyRequest(new IdentifyRequestListener(m.source), this->owner, acc, pass);
Event::OnCheckAuthentication(&Event::CheckAuthentication::OnCheckAuthentication, nullptr, req);
req->Dispatch();
}
@@ -92,7 +92,7 @@ class External : public Mechanism
return;
}
- NickCore *nc = certs->FindAccountFromCert(mysess->cert);
+ NickServ::Account *nc = certs->FindAccountFromCert(mysess->cert);
if (!nc || nc->HasExt("NS_SUSPENDED"))
{
sasl->Fail(sess);
@@ -208,7 +208,7 @@ class SASLService : public SASL::Service, public Timer
IRCD->SendSASLMessage(msg);
}
- void Succeed(Session *session, NickCore *nc) override
+ void Succeed(Session *session, NickServ::Account *nc) override
{
IRCD->SendSVSLogin(session->uid, nc->display);
this->SendMessage(session, "D", "S");