diff options
Diffstat (limited to 'modules/m_sasl.cpp')
-rw-r--r-- | modules/m_sasl.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index 7a803469e..db0ec3d17 100644 --- a/modules/m_sasl.cpp +++ b/modules/m_sasl.cpp @@ -17,7 +17,7 @@ class Plain : public Mechanism public: Plain(Module *o) : Mechanism(o, "PLAIN") { } - void ProcessMessage(Session *sess, const SASL::Message &m) anope_override + void ProcessMessage(Session *sess, const SASL::Message &m) override { if (m.type == "S") { @@ -80,12 +80,12 @@ class External : public Mechanism throw ModuleException("No CertFP"); } - Session* CreateSession(const Anope::string &uid) anope_override + Session* CreateSession(const Anope::string &uid) override { return new Session(this, uid); } - void ProcessMessage(SASL::Session *sess, const SASL::Message &m) anope_override + void ProcessMessage(SASL::Session *sess, const SASL::Message &m) override { Session *mysess = anope_dynamic_static_cast<Session *>(sess); @@ -137,7 +137,7 @@ class SASLService : public SASL::Service, public Timer delete it->second; } - void ProcessMessage(const SASL::Message &m) anope_override + void ProcessMessage(const SASL::Message &m) override { if (m.target != "*") { @@ -202,7 +202,7 @@ class SASLService : public SASL::Service, public Timer session->mech->ProcessMessage(session, m); } - Anope::string GetAgent() anope_override + Anope::string GetAgent() override { Anope::string agent = Config->GetModule(Service::owner)->Get<Anope::string>("agent", "NickServ"); BotInfo *bi = Config->GetClient(agent); @@ -211,7 +211,7 @@ class SASLService : public SASL::Service, public Timer return agent; } - Session* GetSession(const Anope::string &uid) anope_override + Session* GetSession(const Anope::string &uid) override { std::map<Anope::string, Session *>::iterator it = sessions.find(uid); if (it != sessions.end()) @@ -219,12 +219,12 @@ class SASLService : public SASL::Service, public Timer return NULL; } - void RemoveSession(Session *sess) anope_override + void RemoveSession(Session *sess) override { sessions.erase(sess->uid); } - void DeleteSessions(Mechanism *mech, bool da) anope_override + void DeleteSessions(Mechanism *mech, bool da) override { for (std::map<Anope::string, Session *>::iterator it = sessions.begin(); it != sessions.end();) { @@ -238,7 +238,7 @@ class SASLService : public SASL::Service, public Timer } } - void SendMessage(Session *session, const Anope::string &mtype, const Anope::string &data) anope_override + void SendMessage(Session *session, const Anope::string &mtype, const Anope::string &data) override { SASL::Message msg; msg.source = this->GetAgent(); @@ -249,7 +249,7 @@ class SASLService : public SASL::Service, public Timer IRCD->SendSASLMessage(msg); } - void Succeed(Session *session, NickCore *nc) anope_override + void Succeed(Session *session, NickCore *nc) override { // If the user is already introduced then we log them in now. // Otherwise, we send an SVSLOGIN to log them in later. @@ -261,17 +261,17 @@ class SASLService : public SASL::Service, public Timer } else { - IRCD->SendSVSLogin(session->uid, nc->display, na->GetVhostIdent(), na->GetVhostHost()); + IRCD->SendSVSLogin(session->uid, na); } this->SendMessage(session, "D", "S"); } - void Fail(Session *session) anope_override + void Fail(Session *session) override { this->SendMessage(session, "D", "F"); } - void SendMechs(Session *session) anope_override + void SendMechs(Session *session) override { std::vector<Anope::string> mechs = Service::GetServiceKeys("SASL::Mechanism"); Anope::string buf; @@ -281,7 +281,7 @@ class SASLService : public SASL::Service, public Timer this->SendMessage(session, "M", buf.empty() ? "" : buf.substr(1)); } - void Tick(time_t) anope_override + void Tick(time_t) override { for (std::map<Anope::string, Session *>::iterator it = sessions.begin(); it != sessions.end();) { @@ -303,7 +303,7 @@ class ModuleSASL : public Module SASLService sasl; Plain plain; - External *external; + External *external = nullptr; std::vector<Anope::string> mechs; @@ -322,7 +322,7 @@ class ModuleSASL : public Module public: ModuleSASL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - sasl(this), plain(this), external(NULL) + sasl(this), plain(this) { try { @@ -337,17 +337,17 @@ class ModuleSASL : public Module delete external; } - void OnModuleLoad(User *, Module *) anope_override + void OnModuleLoad(User *, Module *) override { CheckMechs(); } - void OnModuleUnload(User *, Module *) anope_override + void OnModuleUnload(User *, Module *) override { CheckMechs(); } - void OnPreUplinkSync(Server *) anope_override + void OnPreUplinkSync(Server *) override { // We have not yet sent a mechanism list so always do it here. IRCD->SendSASLMechanisms(mechs); |