diff options
Diffstat (limited to 'modules/commands/ms_ignore.cpp')
-rw-r--r-- | modules/commands/ms_ignore.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp index f4121ec16..ca6e1ae86 100644 --- a/modules/commands/ms_ignore.cpp +++ b/modules/commands/ms_ignore.cpp @@ -22,7 +22,7 @@ class CommandMSIgnore : public Command this->SetSyntax(_("[\037channel\037] LIST")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { if (Anope::ReadOnly) { @@ -58,7 +58,7 @@ class CommandMSIgnore : public Command if (std::find(mi->ignores.begin(), mi->ignores.end(), param.ci_str()) == mi->ignores.end()) { - mi->ignores.push_back(param.ci_str()); + mi->ignores.emplace_back(param.ci_str()); source.Reply(_("\002%s\002 added to ignore list."), param.c_str()); } else @@ -84,10 +84,10 @@ class CommandMSIgnore : public Command { ListFormatter list(source.GetAccount()); list.AddColumn(_("Mask")); - for (unsigned i = 0; i < mi->ignores.size(); ++i) + for (const auto &ignore : mi->ignores) { ListFormatter::ListEntry entry; - entry["Mask"] = mi->ignores[i]; + entry["Mask"] = ignore; list.AddEntry(entry); } @@ -96,8 +96,8 @@ class CommandMSIgnore : public Command std::vector<Anope::string> replies; list.Process(replies); - for (unsigned i = 0; i < replies.size(); ++i) - source.Reply(replies[i]); + for (const auto &reply : replies) + source.Reply(reply); } } else @@ -106,7 +106,7 @@ class CommandMSIgnore : 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(" "); |