From 25d1c9c176be31458ffc264d5b6e7ccdd8660717 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 28 Dec 2005 21:26:22 +0000 Subject: Changed some other stuff that used the old vector/deque style commandlist git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2687 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_commands.cpp | 4 ++-- src/cmd_stats.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmd_commands.cpp b/src/cmd_commands.cpp index 6ad8ae8b0..961c8db88 100644 --- a/src/cmd_commands.cpp +++ b/src/cmd_commands.cpp @@ -47,9 +47,9 @@ extern InspIRCd* ServerInstance; void cmd_commands::Handle (char **parameters, int pcnt, userrec *user) { - for (unsigned int i = 0; i < ServerInstance->Parser->cmdlist.size(); i++) + for (nspace::hash_map::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++) { - WriteServ(user->fd,"902 %s :%s %s %d",user->nick,ServerInstance->Parser->cmdlist[i]->command.c_str(),ServerInstance->Parser->cmdlist[i]->source.c_str(),ServerInstance->Parser->cmdlist[i]->min_params); + WriteServ(user->fd,"902 %s :%s %s %d",user->nick,i->second->command.c_str(),i->second->source.c_str(),i->second->min_params); } WriteServ(user->fd,"903 %s :End of COMMANDS list",user->nick); } diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp index 4a7547a3a..2d45aa873 100644 --- a/src/cmd_stats.cpp +++ b/src/cmd_stats.cpp @@ -164,12 +164,12 @@ void cmd_stats::Handle (char **parameters, int pcnt, userrec *user) /* stats m (list number of times each command has been used, plus bytecount) */ if (*parameters[0] == 'm') { - for (unsigned int i = 0; i < ServerInstance->Parser->cmdlist.size(); i++) + for (nspace::hash_map::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++) { - if (ServerInstance->Parser->cmdlist[i]->use_count) + if (i->second->use_count) { /* RPL_STATSCOMMANDS */ - WriteServ(user->fd,"212 %s %s %d %d",user->nick,ServerInstance->Parser->cmdlist[i]->command.c_str(),ServerInstance->Parser->cmdlist[i]->use_count,ServerInstance->Parser->cmdlist[i]->total_bytes); + WriteServ(user->fd,"212 %s %s %d %d",user->nick,i->second->command.c_str(),i->second->use_count,i->second->total_bytes); } } -- cgit v1.2.3