diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-04 21:00:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-04 21:00:04 +0000 |
commit | e74c2dce170b38bb9ae942e42fb8123541fe143e (patch) | |
tree | f4259e6c44301abf3aec48807ddcfcb0d573715c /src | |
parent | 2870be6da647c4152dd982ddd74fbe8be196726f (diff) |
Remove leading : from /stats l, add /stats L
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4721 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_stats.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
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<userrec*>::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)); } } } |