From 39cf323606a311b3b7f59a9c9f39a21d42520c24 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 12 Feb 2010 20:18:11 +0000 Subject: Fix stats output to divide in floating-point git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12444 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/stats.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3