diff options
Diffstat (limited to 'modules/commands/ms_sendall.cpp')
-rw-r--r-- | modules/commands/ms_sendall.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/ms_sendall.cpp b/modules/commands/ms_sendall.cpp index 60f93cd87..904e5e161 100644 --- a/modules/commands/ms_sendall.cpp +++ b/modules/commands/ms_sendall.cpp @@ -25,7 +25,7 @@ class CommandMSSendAll : public Command this->SetSyntax(_("\037memo-text\037")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { if (!memoserv) return; @@ -34,10 +34,8 @@ class CommandMSSendAll : public Command Log(LOG_ADMIN, source, this) << "to send " << text; - 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 != source.nc) memoserv->Send(source.GetNick(), nc->display, text); } @@ -45,7 +43,7 @@ class CommandMSSendAll : public Command source.Reply(_("A massmemo has been sent to all registered users.")); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); |