]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_stats.cpp
Increase the size of the matrix for map drawing to 250x250
[user/henk/code/inspircd.git] / src / commands / cmd_stats.cpp
index f9bb0d634fe34553954b9c633706ede17157d092..d270a586484f5d4cb0742dd5882edc5b16efcc6d 100644 (file)
@@ -61,9 +61,14 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
        }
        
        int MOD_RESULT = 0;
-       FOREACH_RESULT(I_OnStats,OnStats(statschar,user,results));
+       FOREACH_RESULT(I_OnStats,OnStats(statschar, user, results));
        if (MOD_RESULT)
+       {
+               results.push_back(sn+" 219 "+user->nick+" "+statschar+" :End of /STATS report");
+               ServerInstance->SNO->WriteToSnoMask('t',"%s '%c' requested by %s (%s@%s)",
+                       (IS_LOCAL(user) ? "Stats" : "Remote stats"), statschar, user->nick.c_str(), user->ident.c_str(), user->host.c_str());
                return;
+       }
 
        switch (statschar)
        {
@@ -208,9 +213,9 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
 
                        ServerInstance->SE->GetStats(kbitpersec_in, kbitpersec_out, kbitpersec_total);
 
-                       snprintf(kbitpersec_total_s, 30, "%03.5f%%", kbitpersec_total);
-                       snprintf(kbitpersec_out_s, 30, "%03.5f%%", kbitpersec_out);
-                       snprintf(kbitpersec_in_s, 30, "%03.5f%%", kbitpersec_in);
+                       snprintf(kbitpersec_total_s, 30, "%03.5f", kbitpersec_total);
+                       snprintf(kbitpersec_out_s, 30, "%03.5f", kbitpersec_out);
+                       snprintf(kbitpersec_in_s, 30, "%03.5f", kbitpersec_in);
 
                        results.push_back(sn+" 249 "+user->nick+" :Bandwidth total:  "+ConvToStr(kbitpersec_total_s)+" kilobits/sec");
                        results.push_back(sn+" 249 "+user->nick+" :Bandwidth out:    "+ConvToStr(kbitpersec_out_s)+" kilobits/sec");