]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Changed printf specifiers in map to right-align digits
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 8 Jan 2006 14:25:08 +0000 (14:25 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 8 Jan 2006 14:25:08 +0000 (14:25 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2737 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index ea5d0664afb981230167afe884559be31b740534..2f83916ac666d6ccec6aba29408dac384590a836 100644 (file)
@@ -2468,7 +2468,9 @@ class ModuleSpanningTree : public Module
                        memset(spacer,' ',40);
                        if ((40 - Current->GetName().length() - depth) > 1) {
                                spacer[40 - Current->GetName().length() - depth] = '\0';
-                       } else {
+                       }
+                       else
+                       {
                                spacer[5] = '\0';
                        }
 
@@ -2477,10 +2479,12 @@ class ModuleSpanningTree : public Module
                        if (clientlist.size() == 0) {
                                // If there are no users, WHO THE HELL DID THE /MAP?!?!?!
                                percent = 0;
-                       } else {
+                       }
+                       else
+                       {
                                percent = ((float)Current->GetUserCount() / (float)clientlist.size()) * 100;
                        }
-                       snprintf(text, 80, "%s %s%d [%.2f%%]", Current->GetName().c_str(), spacer, Current->GetUserCount(), percent);
+                       snprintf(text, 80, "%s %s%5d [%3.2f%%]", Current->GetName().c_str(), spacer, Current->GetUserCount(), percent);
                        strlcpy(&matrix[line][depth],text,80);
                        line++;
                        for (unsigned int q = 0; q < Current->ChildCount(); q++)