summaryrefslogtreecommitdiff
path: root/modules/commands/ns_alist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/ns_alist.cpp')
-rw-r--r--modules/commands/ns_alist.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp
index e9b69809c..e0f160aa2 100644
--- a/modules/commands/ns_alist.cpp
+++ b/modules/commands/ns_alist.cpp
@@ -51,9 +51,8 @@ class CommandNSAList : public Command
nc->GetChannelReferences(queue);
std::sort(queue.begin(), queue.end(), ChannelSort);
- for (unsigned i = 0; i < queue.size(); ++i)
+ for (auto *ci : queue)
{
- ChannelInfo *ci = queue[i];
ListFormatter::ListEntry entry;
if (ci->GetFounder() == nc)
@@ -86,10 +85,8 @@ class CommandNSAList : public Command
entry["Number"] = stringify(chan_count);
entry["Channel"] = (ci->HasExt("CS_NO_EXPIRE") ? "!" : "") + ci->name;
- for (unsigned j = 0; j < access.paths.size(); ++j)
+ for (auto &p : access.paths)
{
- ChanAccess::Path &p = access.paths[j];
-
// not interested in indirect access
if (p.size() != 1)
continue;
@@ -113,8 +110,8 @@ class CommandNSAList : public Command
{
source.Reply(_("Channels that \002%s\002 has access on:"), nc->display.c_str());
- for (unsigned i = 0; i < replies.size(); ++i)
- source.Reply(replies[i]);
+ for (const auto &reply : replies)
+ source.Reply(reply);
source.Reply(_("End of list - %d channels shown."), chan_count);
}