- // These arrays represent a virtual screen which we will
- // "scratch" draw to, as the console device of an irc
- // client does not provide for a proper terminal.
- int totusers = ServerInstance->Users->clientlist->size();
- int totservers = this->CountServs();
- int maxnamew = 0;
- int line = 0;
- char* names = new char[totservers * 100];
- char* stats = new char[totservers * 50];
-
- // The only recursive bit is called here.
- ShowMap(Utils->TreeRoot,user,0,line,names,maxnamew,stats);
-
- // Process each line one by one.
- for (int l = 1; l < line; l++)
- {
- char* myname = names + 100 * l;
- // scan across the line looking for the start of the
- // servername (the recursive part of the algorithm has placed
- // the servers at indented positions depending on what they
- // are related to)
- int first_nonspace = 0;
-
- while (myname[first_nonspace] == ' ')