summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/override_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/override_map.cpp')
-rw-r--r--src/modules/m_spanningtree/override_map.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 14d0a3b4f..b5da11280 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -77,9 +77,11 @@ void CommandMap::ShowMap(TreeServer* Current, User* user, int depth, int &line,
if (user->IsOper() || !Utils->FlatLinks)
depth = depth + 2;
- for (unsigned int q = 0; q < Current->ChildCount(); q++)
+
+ const TreeServer::ChildServers& servers = Current->GetChildren();
+ for (TreeServer::ChildServers::const_iterator i = servers.begin(); i != servers.end(); ++i)
{
- TreeServer* child = Current->GetChild(q);
+ TreeServer* child = *i;
if (!user->IsOper()) {
if (child->Hidden)
continue;