diff options
| author | 2005-12-28 21:26:22 +0000 | |
|---|---|---|
| committer | 2005-12-28 21:26:22 +0000 | |
| commit | 25d1c9c176be31458ffc264d5b6e7ccdd8660717 (patch) | |
| tree | 0d86195009e14f8f3737b86acbe34f19b6560967 /src/cmd_stats.cpp | |
| parent | Changed from std::map to hash_map (diff) | |
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
Diffstat (limited to 'src/cmd_stats.cpp')
| -rw-r--r-- | src/cmd_stats.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); } } |
