- for (unsigned int q = 0; q < Current->ChildCount(); q++)
- {
- ServerInstance->Logs->Log("map",DEBUG,"Hidden? %d HideULines? %d GetName %s", Current->GetChild(q)->Hidden, Utils->HideULines, Current->GetChild(q)->GetName().c_str());
- if ((Current->GetChild(q)->Hidden) || ((Utils->HideULines) && (ServerInstance->ULine(Current->GetChild(q)->GetName().c_str()))))
- {
- if (*user->oper)
- {
- ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper)) ? depth : depth+2,matrix,totusers,totservers);
- ServerInstance->Logs->Log("map",DEBUG,"Show to oper");
- }
- ServerInstance->Logs->Log("map",DEBUG,"Fall through");
- }
- else
- {
- ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper)) ? depth : depth+2,matrix,totusers,totservers);
- ServerInstance->Logs->Log("map",DEBUG,"Show to non oper");
- }
- }
- ServerInstance->Logs->Log("map",DEBUG,"After loop");
+ const TreeServer::ChildServers& servers = current->GetChildren();
+ for (TreeServer::ChildServers::const_iterator i = servers.begin(); i != servers.end(); ++i)
+ {
+ TreeServer* child = *i;
+ GetDepthAndLen(child, depth + 1, max_depth, max_len);