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/commands/ns_cert.cpp | |
parent | d76d74719687bd2bce2af661208e77db365c1b2d (diff) |
Replace anope_{final,override} with their C++11 equivalent.
Diffstat (limited to 'modules/commands/ns_cert.cpp')
-rw-r--r-- | modules/commands/ns_cert.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp index fec857109..328216de6 100644 --- a/modules/commands/ns_cert.cpp +++ b/modules/commands/ns_cert.cpp @@ -18,7 +18,7 @@ struct CertServiceImpl : CertService { CertServiceImpl(Module *o) : CertService(o) { } - NickCore* FindAccountFromCert(const Anope::string &cert) anope_override + NickCore* FindAccountFromCert(const Anope::string &cert) override { Anope::hash_map<NickCore *>::iterator it = certmap.find(cert); if (it != certmap.end()) @@ -46,7 +46,7 @@ struct NSCertListImpl : NSCertList * * Adds a new entry into the cert list. */ - void AddCert(const Anope::string &entry) anope_override + void AddCert(const Anope::string &entry) override { this->certs.push_back(entry); certmap[entry] = nc; @@ -60,14 +60,14 @@ struct NSCertListImpl : NSCertList * * Retrieves an entry from the certificate list corresponding to the given index. */ - Anope::string GetCert(unsigned entry) const anope_override + Anope::string GetCert(unsigned entry) const override { if (entry >= this->certs.size()) return ""; return this->certs[entry]; } - unsigned GetCertCount() const anope_override + unsigned GetCertCount() const override { return this->certs.size(); } @@ -79,7 +79,7 @@ struct NSCertListImpl : NSCertList * * Search for an fingerprint within the cert list. */ - bool FindCert(const Anope::string &entry) const anope_override + bool FindCert(const Anope::string &entry) const override { return std::find(this->certs.begin(), this->certs.end(), entry) != this->certs.end(); } @@ -90,7 +90,7 @@ struct NSCertListImpl : NSCertList * * Removes the specified fingerprint from the cert list. */ - void EraseCert(const Anope::string &entry) anope_override + void EraseCert(const Anope::string &entry) override { std::vector<Anope::string>::iterator it = std::find(this->certs.begin(), this->certs.end(), entry); if (it != this->certs.end()) @@ -105,7 +105,7 @@ struct NSCertListImpl : NSCertList * * Deletes all the memory allocated in the certificate list vector and then clears the vector. */ - void ClearCert() anope_override + void ClearCert() override { FOREACH_MOD(OnNickClearCert, (this->nc)); for (unsigned i = 0; i < certs.size(); ++i) @@ -113,7 +113,7 @@ struct NSCertListImpl : NSCertList this->certs.clear(); } - void Check() anope_override + void Check() override { if (this->certs.empty()) nc->Shrink<NSCertList>("certificates"); @@ -123,7 +123,7 @@ struct NSCertListImpl : NSCertList { ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem<NSCertListImpl>(m, ename) { } - void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override + void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { if (s->GetSerializableType()->GetName() != "NickCore") return; @@ -137,7 +137,7 @@ struct NSCertListImpl : NSCertList data["cert"] << c->GetCert(i) << " "; } - void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override + void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override { if (s->GetSerializableType()->GetName() != "NickCore") return; @@ -260,7 +260,7 @@ class CommandNSCert : public Command this->SetSyntax(_("LIST [\037nickname\037]")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { const Anope::string &cmd = params[0]; Anope::string nick, certfp; @@ -312,7 +312,7 @@ class CommandNSCert : public Command this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -352,7 +352,7 @@ class NSCert : public Module throw ModuleException("Your IRCd does not support ssl client certificates"); } - void OnFingerprint(User *u) anope_override + void OnFingerprint(User *u) override { BotInfo *NickServ = Config->GetClient("NickServ"); if (!NickServ || u->IsIdentified()) @@ -379,7 +379,7 @@ class NSCert : public Module Log(NickServ) << u->GetMask() << " automatically identified for account " << nc->display << " via SSL certificate fingerprint"; } - EventReturn OnNickValidate(User *u, NickAlias *na) anope_override + EventReturn OnNickValidate(User *u, NickAlias *na) override { NSCertList *cl = certs.Get(na->nc); if (!u->fingerprint.empty() && cl && cl->FindCert(u->fingerprint)) |