summaryrefslogtreecommitdiff
path: root/modules/commands/bs_botlist.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2023-10-10 21:14:50 +0100
committerSadie Powell <sadie@witchery.services>2023-10-11 15:51:52 +0100
commita3241065c55fd2a69e8793b89a5d0b1a957b3fd0 (patch)
tree82f80ce2f3bbbdc1c1ef05fe611093cf0b34eab6 /modules/commands/bs_botlist.cpp
parentdc371aad6d059dbf7f30f6878c680532bedd4146 (diff)
Start migrating to range-based for loops.
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);
}