]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/override_map.cpp
Remove debug, thanks for reminding me danieldg
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / override_map.cpp
index d50215b76c1480e4fe77f0d2877a9a5561f302ab..7103b23defa01ecb72966002a11c8f89bb9238c0 100644 (file)
@@ -66,14 +66,14 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
                /* Neat and tidy default values, as we're dealing with a matrix not a simple string */
                memset(text, 0, 128);
 
-               if (ServerInstance->clientlist->size() == 0)
+               if (ServerInstance->Users->clientlist->size() == 0)
                {
                        // If there are no users, WHO THE HELL DID THE /MAP?!?!?!
                        percent = 0;
                }
                else
                {
-                       percent = ((float)Current->GetUserCount() / (float)ServerInstance->clientlist->size()) * 100;
+                       percent = ((float)Current->GetUserCount() / (float)ServerInstance->Users->clientlist->size()) * 100;
                }
 
                const std::string operdata = IS_OPER(user) ? MapOperInfo(Current) : "";
@@ -109,7 +109,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
 // and divisons, we instead render the map onto a backplane of characters
 // (a character matrix), then draw the branches as a series of "L" shapes
 // from the nodes. This is not only friendlier on CPU it uses less stack.
-void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, User* user)
+void ModuleSpanningTree::HandleMap(const char* const* parameters, int pcnt, User* user)
 {
        // This array represents a virtual screen which we will
        // "scratch" draw to, as the console device of an irc
@@ -167,11 +167,11 @@ void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, User* user
        // dump the whole lot to the user. This is the easy bit, honest.
        for (int t = 0; t < line; t++)
        {
-               user->WriteServ("006 %s :%s",user->nick,&matrix[t][0]);
+               user->WriteNumeric(6, "%s :%s",user->nick,&matrix[t][0]);
        }
        float avg_users = totusers / totservers;
-       user->WriteServ("270 %s :%.0f server%s and %.0f user%s, average %.2f users per server",user->nick,totservers,(totservers > 1 ? "s" : ""),totusers,(totusers > 1 ? "s" : ""),avg_users);
-       user->WriteServ("007 %s :End of /MAP",user->nick);
+       user->WriteNumeric(270, "%s :%.0f server%s and %.0f user%s, average %.2f users per server",user->nick,totservers,(totservers > 1 ? "s" : ""),totusers,(totusers > 1 ? "s" : ""),avg_users);
+       user->WriteNumeric(7, "%s :End of /MAP",user->nick);
        return;
 }