diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_lusers.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_stats.cpp | 8 | ||||
-rw-r--r-- | src/commands/cmd_trace.cpp | 45 | ||||
-rw-r--r-- | src/commands/cmd_who.cpp | 4 |
4 files changed, 7 insertions, 52 deletions
diff --git a/src/commands/cmd_lusers.cpp b/src/commands/cmd_lusers.cpp index f91266a15..317229ceb 100644 --- a/src/commands/cmd_lusers.cpp +++ b/src/commands/cmd_lusers.cpp @@ -25,7 +25,7 @@ CmdResult CommandLusers::Handle (const char**, int, User *user) { // this lusers command shows one server at all times because // a protocol module must override it to show those stats. - user->WriteServ("251 %s :There are %d users and %d invisible on 1 server",user->nick,ServerInstance->Users->UserCount()-ServerInstance->ModeCount('i'),ServerInstance->ModeCount('i')); + user->WriteServ("251 %s :There are %d users and %d invisible on 1 server",user->nick,ServerInstance->Users->UserCount()-ServerInstance->Users->ModeCount('i'),ServerInstance->Users->ModeCount('i')); if (ServerInstance->Users->OperCount()) user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->Users->OperCount()); if (ServerInstance->Users->UnregisteredUserCount()) diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 3d81dd84f..de9237c61 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -126,7 +126,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str case 'P': { int idx = 0; - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) + for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); i++) { if (IS_OPER(i->second) && !ServerInstance->ULine(i->second->server)) { @@ -171,7 +171,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str case 'z': { results.push_back(sn+" 240 "+user->nick+" :InspIRCd(CLASS) "+ConvToStr(sizeof(InspIRCd))+" bytes"); - results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(ServerInstance->clientlist->size())+" ("+ConvToStr(ServerInstance->clientlist->size()*sizeof(User))+" bytes)"); + results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(ServerInstance->Users->clientlist->size())+" ("+ConvToStr(ServerInstance->Users->clientlist->size()*sizeof(User))+" bytes)"); results.push_back(sn+" 249 "+user->nick+" :Channels(HASH_MAP) "+ConvToStr(ServerInstance->chanlist->size())+" ("+ConvToStr(ServerInstance->chanlist->size()*sizeof(Channel))+" bytes)"); results.push_back(sn+" 249 "+user->nick+" :Commands(VECTOR) "+ConvToStr(ServerInstance->Parser->cmdlist.size())+" ("+ConvToStr(ServerInstance->Parser->cmdlist.size()*sizeof(Command))+" bytes)"); @@ -255,7 +255,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str /* stats l (show user I/O stats) */ case 'l': results.push_back(sn+" 211 "+user->nick+" :nick[ident@host] sendq cmds_out bytes_out cmds_in bytes_in time_open"); - for (std::vector<User*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++) + for (std::vector<User*>::iterator n = ServerInstance->Users->local_users.begin(); n != ServerInstance->Users->local_users.end(); n++) { User* i = *n; if (ServerInstance->IsNick(i->nick)) @@ -268,7 +268,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str /* stats L (show user I/O stats with IP addresses) */ case '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<User*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++) + for (std::vector<User*>::iterator n = ServerInstance->Users->local_users.begin(); n != ServerInstance->Users->local_users.end(); n++) { User* i = *n; if (ServerInstance->IsNick(i->nick)) diff --git a/src/commands/cmd_trace.cpp b/src/commands/cmd_trace.cpp deleted file mode 100644 index b81a732b8..000000000 --- a/src/commands/cmd_trace.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#include "inspircd.h" -#include "commands/cmd_trace.h" - -extern "C" DllExport Command* init_command(InspIRCd* Instance) -{ - return new CommandTrace(Instance); -} - -/** XXX: This is crap. someone fix this when you have time, to be more useful. - */ -CmdResult CommandTrace::Handle (const char**, int, User *user) -{ - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) - { - if (i->second->registered == REG_ALL) - { - if (IS_OPER(i->second)) - { - user->WriteServ("205 %s :Oper 0 %s",user->nick,i->second->nick); - } - else - { - user->WriteServ("204 %s :User 0 %s",user->nick,i->second->nick); - } - } - else - { - user->WriteServ("203 %s :???? 0 [%s]",user->nick,i->second->host); - } - } - return CMD_SUCCESS; -} diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index 1a323edd4..091ba728b 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -298,7 +298,7 @@ CmdResult CommandWho::Handle (const char** parameters, int pcnt, User *user) if (opt_viewopersonly) { /* Showing only opers */ - for (std::list<User*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++) + for (std::list<User*>::iterator i = ServerInstance->Users->all_opers.begin(); i != ServerInstance->Users->all_opers.end(); i++) { User* oper = *i; @@ -316,7 +316,7 @@ CmdResult CommandWho::Handle (const char** parameters, int pcnt, User *user) } else { - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) + for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); i++) { if (whomatch(i->second, matchtext)) { |