diff options
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 587133975..7a5df7d09 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -379,21 +379,13 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) } } -bool CommandParser::RemoveCommands(const char* source) +void CommandParser::RemoveCommands(const char* source) { command_table::iterator i,safei; - for (i = cmdlist.begin(); i != cmdlist.end(); i++) + for (i = cmdlist.begin(); i != cmdlist.end();) { safei = i; - safei++; - if (safei != cmdlist.end()) - { - RemoveCommand(safei, source); - } - } - safei = cmdlist.begin(); - if (safei != cmdlist.end()) - { + i++; RemoveCommand(safei, source); } return true; |
