summaryrefslogtreecommitdiff
path: root/modules/commands/ns_getemail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/ns_getemail.cpp')
-rw-r--r--modules/commands/ns_getemail.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/commands/ns_getemail.cpp b/modules/commands/ns_getemail.cpp
index 685431fe9..184e885c8 100644
--- a/modules/commands/ns_getemail.cpp
+++ b/modules/commands/ns_getemail.cpp
@@ -17,24 +17,22 @@
class CommandNSGetEMail : public Command
{
- public:
+public:
CommandNSGetEMail(Module *creator) : Command(creator, "nickserv/getemail", 1, 1)
{
this->SetDesc(_("Matches and returns all users that registered using given email"));
this->SetSyntax(_("\037email\037"));
}
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
+ void Execute(CommandSource &source, const std::vector<Anope::string> &params) 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(" ");
@@ -63,7 +61,7 @@ class CommandNSGetEMail : public Command
class NSGetEMail : public Module
{
CommandNSGetEMail commandnsgetemail;
- public:
+public:
NSGetEMail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnsgetemail(this)
{