summaryrefslogtreecommitdiff
path: root/src/stats.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-12 20:18:11 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-12 20:18:11 +0000
commit39cf323606a311b3b7f59a9c9f39a21d42520c24 (patch)
tree2b8ff9400913cdaed08c1c12bdff020277829bf8 /src/stats.cpp
parent5ed94d962740ee1c86f3ae87960056a6aa97e955 (diff)
Fix stats output to divide in floating-point
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12444 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/stats.cpp')
-rw-r--r--src/stats.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stats.cpp b/src/stats.cpp
index a4b9fa133..9c177c780 100644
--- a/src/stats.cpp
+++ b/src/stats.cpp
@@ -248,7 +248,8 @@ void InspIRCd::DoStats(char statschar, User* user, string_list &results)
results.push_back(sn+" 249 "+user->nick+" :nick collisions "+ConvToStr(this->stats->statsCollisions));
results.push_back(sn+" 249 "+user->nick+" :dns requests "+ConvToStr(this->stats->statsDnsGood+this->stats->statsDnsBad)+" succeeded "+ConvToStr(this->stats->statsDnsGood)+" failed "+ConvToStr(this->stats->statsDnsBad));
results.push_back(sn+" 249 "+user->nick+" :connection count "+ConvToStr(this->stats->statsConnects));
- snprintf(buffer,MAXBUF," 249 %s :bytes sent %5.2fK recv %5.2fK",user->nick.c_str(),this->stats->statsSent / 1024,this->stats->statsRecv / 1024);
+ snprintf(buffer,MAXBUF," 249 %s :bytes sent %5.2fK recv %5.2fK",
+ user->nick.c_str(),this->stats->statsSent / 1024.0,this->stats->statsRecv / 1024.0);
results.push_back(sn+buffer);
}
break;