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.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp
index d47a98f4d..b124aa2ce 100644
--- a/modules/commands/bs_botlist.cpp
+++ b/modules/commands/bs_botlist.cpp
@@ -26,10 +26,8 @@ class CommandBSBotList : public Command
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,8 +48,8 @@ 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);
}