diff options
author | Sadie Powell <sadie@witchery.services> | 2022-01-03 16:50:06 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-01-03 19:02:44 +0000 |
commit | a5f7aac2953e94e49b93e9195ae8d4dccba46f6d (patch) | |
tree | 442645fb3bb3da945b39fe2adeb07e71348b8771 /modules/m_sasl.cpp | |
parent | d76d74719687bd2bce2af661208e77db365c1b2d (diff) |
Replace anope_{final,override} with their C++11 equivalent.
Diffstat (limited to 'modules/m_sasl.cpp')
-rw-r--r-- | modules/m_sasl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index a838a1aca..3918a3152 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. @@ -266,12 +266,12 @@ class SASLService : public SASL::Service, public Timer 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();) { @@ -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); |