From e74c2dce170b38bb9ae942e42fb8123541fe143e Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Aug 2006 21:00:04 +0000 Subject: Remove leading : from /stats l, add /stats L git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4721 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_stats.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp index ee9cf1d0c..f732cd7af 100644 --- a/src/cmd_stats.cpp +++ b/src/cmd_stats.cpp @@ -219,7 +219,21 @@ void DoStats(char statschar, userrec* user, string_list &results) userrec* i = *n; if (isnick(i->nick)) { - results.push_back(sn+" 211 "+user->nick+" :"+i->nick+"["+i->ident+"@"+i->dhost+"] "+ConvToStr(i->sendq.length())+" "+ConvToStr(i->cmds_out)+" "+ConvToStr(i->bytes_out)+" "+ConvToStr(i->cmds_in)+" "+ConvToStr(i->bytes_in)+" "+ConvToStr(TIME - i->age)); + results.push_back(sn+" 211 "+user->nick+" "+i->nick+"["+i->ident+"@"+i->dhost+"] "+ConvToStr(i->sendq.length())+" "+ConvToStr(i->cmds_out)+" "+ConvToStr(i->bytes_out)+" "+ConvToStr(i->cmds_in)+" "+ConvToStr(i->bytes_in)+" "+ConvToStr(TIME - i->age)); + } + } + } + + /* stats L (show user I/O stats with IP addresses) */ + if (statschar == 'L') + { + results.push_back(sn+" 211 "+user->nick+" :nick[ident@ip] sendq cmds_out bytes_out cmds_in bytes_in time_open"); + for (std::vector::iterator n = local_users.begin(); n != local_users.end(); n++) + { + userrec* i = *n; + if (isnick(i->nick)) + { + results.push_back(sn+" 211 "+user->nick+" "+i->nick+"["+i->ident+"@"+i->GetIPString()+"] "+ConvToStr(i->sendq.length())+" "+ConvToStr(i->cmds_out)+" "+ConvToStr(i->bytes_out)+" "+ConvToStr(i->cmds_in)+" "+ConvToStr(i->bytes_in)+" "+ConvToStr(TIME - i->age)); } } } -- cgit v1.2.3