diff options
Diffstat (limited to 'modules/commands/ns_getemail.cpp')
-rw-r--r-- | modules/commands/ns_getemail.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/ns_getemail.cpp b/modules/commands/ns_getemail.cpp index 685431fe9..de418cd0c 100644 --- a/modules/commands/ns_getemail.cpp +++ b/modules/commands/ns_getemail.cpp @@ -24,17 +24,15 @@ class CommandNSGetEMail : public Command this->SetSyntax(_("\037email\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 &email = params[0]; int j = 0; Log(LOG_ADMIN, source, this) << "on " << email; - for (nickcore_map::const_iterator it = NickCoreList->begin(), it_end = NickCoreList->end(); it != it_end; ++it) + for (const auto &[_, nc] : *NickCoreList) { - const NickCore *nc = it->second; - if (!nc->email.empty() && Anope::Match(nc->email, email)) { ++j; @@ -51,7 +49,7 @@ class CommandNSGetEMail : public Command return; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); |