diff options
Diffstat (limited to 'modules/commands/os_noop.cpp')
-rw-r--r-- | modules/commands/os_noop.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp index e99be9d78..23cf83142 100644 --- a/modules/commands/os_noop.cpp +++ b/modules/commands/os_noop.cpp @@ -21,7 +21,7 @@ class CommandOSNOOP : public Command this->SetSyntax(_("REVOKE \037server\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]; const Anope::string &server = params[1]; @@ -42,10 +42,8 @@ class CommandOSNOOP : public Command Anope::string reason = "NOOP command used by " + source.GetNick(); /* Kill all the IRCops of the server */ - for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + for (const auto &[_, u2] : UserListByNick) { - User *u2 = it->second; - if (u2->server == s && u2->HasMode("OPER")) u2->Kill(*source.service, reason); } @@ -61,7 +59,7 @@ class CommandOSNOOP : 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(" "); @@ -85,7 +83,7 @@ class OSNOOP : public Module } - void OnUserModeSet(const MessageSource &, User *u, const Anope::string &mname) anope_override + void OnUserModeSet(const MessageSource &, User *u, const Anope::string &mname) override { Anope::string *setter; if (mname == "OPER" && (setter = noop.Get(u->server))) |