diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 16:35:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 16:35:24 +0000 |
commit | 1cbf29e3cd070c12437a657b47fc433008b2c74d (patch) | |
tree | 22b7a435ffd8bfa7dd97f2457b73df564753eddc /src/cmd_stats.cpp | |
parent | 89749a74402913d50bd5a9140757a383d6ff175e (diff) |
Move clientlist and chanlist into InspIRCd*
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4818 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r-- | src/cmd_stats.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp index ce8d22434..30cc2eb0d 100644 --- a/src/cmd_stats.cpp +++ b/src/cmd_stats.cpp @@ -48,8 +48,6 @@ extern int MODCOUNT; extern ModuleList modules; extern FactoryList factory; extern time_t TIME; -extern user_hash clientlist; -extern chan_hash chanlist; extern std::vector<userrec*> local_users; void cmd_stats::Handle (const char** parameters, int pcnt, userrec *user) @@ -113,7 +111,7 @@ void DoStats(char statschar, userrec* user, string_list &results) if (statschar == 'P') { int idx = 0; - for (user_hash::iterator i = clientlist.begin(); i != clientlist.end(); i++) + for (user_hash::iterator i = ServerInstance->clientlist.begin(); i != ServerInstance->clientlist.end(); i++) { if (*i->second->oper) { @@ -167,8 +165,8 @@ void DoStats(char statschar, userrec* user, string_list &results) if (statschar == 'z') { rusage R; - results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(clientlist.size())+" ("+ConvToStr(clientlist.size()*sizeof(userrec))+" bytes, "+ConvToStr(clientlist.bucket_count())+" buckets)"); - results.push_back(sn+" 249 "+user->nick+" :Channels(HASH_MAP) "+ConvToStr(chanlist.size())+" ("+ConvToStr(chanlist.size()*sizeof(chanrec))+" bytes, "+ConvToStr(chanlist.bucket_count())+" buckets)"); + results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(ServerInstance->clientlist.size())+" ("+ConvToStr(ServerInstance->clientlist.size()*sizeof(userrec))+" bytes, "+ConvToStr(ServerInstance->clientlist.bucket_count())+" buckets)"); + results.push_back(sn+" 249 "+user->nick+" :Channels(HASH_MAP) "+ConvToStr(ServerInstance->chanlist.size())+" ("+ConvToStr(ServerInstance->chanlist.size()*sizeof(chanrec))+" bytes, "+ConvToStr(ServerInstance->chanlist.bucket_count())+" buckets)"); results.push_back(sn+" 249 "+user->nick+" :Commands(VECTOR) "+ConvToStr(ServerInstance->Parser->cmdlist.size())+" ("+ConvToStr(ServerInstance->Parser->cmdlist.size()*sizeof(command_t))+" bytes)"); results.push_back(sn+" 249 "+user->nick+" :MOTD(VECTOR) "+ConvToStr(ServerInstance->Config->MOTD.size())+", RULES(VECTOR) "+ConvToStr(ServerInstance->Config->RULES.size())); results.push_back(sn+" 249 "+user->nick+" :Modules(VECTOR) "+ConvToStr(modules.size())+" ("+ConvToStr(modules.size()*sizeof(Module))+")"); |