summaryrefslogtreecommitdiff
path: root/src/cmd_stats.cpp
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-08 17:05:48 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-08 17:05:48 +0000
commitd54fbc71e2a2e0f70002e2d36c669c4aa3d59e17 (patch)
tree9e22656474f0fc034de7cf317d7aa7ae22a8abe8 /src/cmd_stats.cpp
parent315cd88a911eaa327df520e8533be82efea0c66f (diff)
Split inspircd_io.* insp inspsocket.* and configreader.* with a few odd bits going into inspircd.*, doesn't look like I've broken anything... :P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3847 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r--src/cmd_stats.cpp37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 4f2de6dfe..c83974ec4 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -14,18 +14,10 @@
* ---------------------------------------------------
*/
-using namespace std;
-
#include "inspircd_config.h"
#include "inspircd.h"
-#include "inspircd_io.h"
-#include <time.h>
-#include <string>
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
+#include "configreader.h"
+#include "hash_map.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -36,10 +28,7 @@ using namespace std;
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
#endif
-#include <map>
-#include <sstream>
-#include <vector>
-#include <deque>
+
#include "users.h"
#include "ctables.h"
#include "globals.h"
@@ -55,21 +44,17 @@ using namespace std;
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socketengine.h"
-#include "typedefs.h"
#include "command_parse.h"
#include "cmd_stats.h"
extern ServerConfig* Config;
extern InspIRCd* ServerInstance;
extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
+extern ModuleList modules;
+extern FactoryList factory;
extern time_t TIME;
extern user_hash clientlist;
extern chan_hash chanlist;
-extern std::vector<userrec*> all_opers;
-extern std::vector<userrec*> local_users;
-extern userrec* fd_ref_table[MAX_DESCRIPTORS];
void cmd_stats::Handle (char **parameters, int pcnt, userrec *user)
{
@@ -205,12 +190,12 @@ void cmd_stats::Handle (char **parameters, int pcnt, userrec *user)
if (*parameters[0] == 'T')
{
- WriteServ(user->fd,"249 Brain :accepts %d refused %d",ServerInstance->stats->statsAccept,ServerInstance->stats->statsRefused);
- WriteServ(user->fd,"249 Brain :unknown commands %d",ServerInstance->stats->statsUnknown);
- WriteServ(user->fd,"249 Brain :nick collisions %d",ServerInstance->stats->statsCollisions);
- WriteServ(user->fd,"249 Brain :dns requests %d succeeded %d failed %d",ServerInstance->stats->statsDns,ServerInstance->stats->statsDnsGood,ServerInstance->stats->statsDnsBad);
- WriteServ(user->fd,"249 Brain :connections %d",ServerInstance->stats->statsConnects);
- WriteServ(user->fd,"249 Brain :bytes sent %dK recv %dK",(ServerInstance->stats->statsSent / 1024),(ServerInstance->stats->statsRecv / 1024));
+ WriteServ(user->fd,"249 %s :accepts %d refused %d",user->nick,ServerInstance->stats->statsAccept,ServerInstance->stats->statsRefused);
+ WriteServ(user->fd,"249 %s :unknown commands %d",user->nick,ServerInstance->stats->statsUnknown);
+ WriteServ(user->fd,"249 %s :nick collisions %d",user->nick,ServerInstance->stats->statsCollisions);
+ WriteServ(user->fd,"249 %s :dns requests %d succeeded %d failed %d",user->nick,ServerInstance->stats->statsDns,ServerInstance->stats->statsDnsGood,ServerInstance->stats->statsDnsBad);
+ WriteServ(user->fd,"249 %s :connections %d",user->nick,ServerInstance->stats->statsConnects);
+ WriteServ(user->fd,"249 %s :bytes sent %dK recv %dK",user->nick,(ServerInstance->stats->statsSent / 1024),(ServerInstance->stats->statsRecv / 1024));
}
/* stats o */