diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_commands.cpp | 4 | ||||
-rw-r--r-- | 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<std::string,command_t*>::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<std::string,command_t*>::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); } } |