summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-18 20:51:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-18 20:51:22 +0000
commita5f65582fe5d110f522c3e1ad2ba666eb1791f73 (patch)
treeba240849bfb8e58cfb3f1e64734ec6bd079ec80f
parent742d519b6766ca39fab713016a09ee39b27a7527 (diff)
more fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9921 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands/cmd_stats.cpp2
-rw-r--r--win/inspircd_namedpipe.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp
index 0857adb44..7cb2586a7 100644
--- a/src/commands/cmd_stats.cpp
+++ b/src/commands/cmd_stats.cpp
@@ -202,6 +202,8 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
results.push_back(sn+" 249 "+user->nick+" :MOTD(VECTOR) "+ConvToStr(ServerInstance->Config->MOTD.size())+", RULES(VECTOR) "+ConvToStr(ServerInstance->Config->RULES.size()));
float kbitpersec_in, kbitpersec_out, kbitpersec_total;
+ char kbitpersec_in_s[30], kbitpersec_out_s[30], kbitpersec_total_s[30];
+
ServerInstance->SE->GetStats(kbitpersec_in, kbitpersec_out, kbitpersec_total);
snprintf(kbitspersec_total_s, 30, "%03.5f%%", kbitspersec_total);
diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp
index 3f0f47fdf..f86b70c1e 100644
--- a/win/inspircd_namedpipe.cpp
+++ b/win/inspircd_namedpipe.cpp
@@ -63,6 +63,7 @@ void IPCThread::Run()
std::stringstream stat;
DWORD Written = 0;
float kbitpersec_in, kbitpersec_out, kbitpersec_total;
+ char kbitpersec_in_s[30], kbitpersec_out_s[30], kbitpersec_total_s[30];
PROCESS_MEMORY_COUNTERS MemCounters;
@@ -80,9 +81,9 @@ void IPCThread::Run()
stat << "pid " << GetProcessId(GetCurrentProcess()) << std::endl;
stat << "request " << oldrequest << std::endl;
stat << "result " << this->GetResult() << std::endl;
- stat << "kbitspersectotal " << kbitpersec_total << std::endl;
- stat << "kbitspersecout " << kbitpersec_out << std::endl;
- stat << "kbitspersecin " << kbitpersec_in << std::endl;
+ stat << "kbitspersectotal " << kbitpersec_total_s << std::endl;
+ stat << "kbitspersecout " << kbitpersec_out_s << std::endl;
+ stat << "kbitspersecin " << kbitpersec_in_s << std::endl;
if (HaveMemoryStats)
{
stat << "workingset " << MemCounters.WorkingSetSize << std::endl;