summaryrefslogtreecommitdiff
path: root/modules/commands/bs_botlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/bs_botlist.cpp')
-rw-r--r--modules/commands/bs_botlist.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp
index 71d8ee3ee..b124aa2ce 100644
--- a/modules/commands/bs_botlist.cpp
+++ b/modules/commands/bs_botlist.cpp
@@ -19,17 +19,15 @@ class CommandBSBotList : public Command
this->SetDesc(_("Lists available bots"));
}
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
+ void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
unsigned count = 0;
ListFormatter list(source.GetAccount());
list.AddColumn(_("Nick")).AddColumn(_("Mask"));
- for (botinfo_map::const_iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
+ for (const auto &[_, bi] : *BotListByNick)
{
- BotInfo *bi = it->second;
-
if (source.HasPriv("botserv/administration") || !bi->oper_only)
{
++count;
@@ -50,14 +48,14 @@ class CommandBSBotList : public Command
{
source.Reply(_("Bot list:"));
- for (unsigned i = 0; i < replies.size(); ++i)
- source.Reply(replies[i]);
+ for (const auto &reply : replies)
+ source.Reply(reply);
source.Reply(_("%d bots available."), count);
}
}
- bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
+ bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
this->SendSyntax(source);
source.Reply(" ");