diff options
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index dab770312..9e54a63d9 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -367,24 +367,15 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd) } } -bool CommandParser::RemoveCommands(const char* source) +void CommandParser::RemoveCommands(const char* source) { Commandable::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; } void CommandParser::RemoveCommand(Commandable::iterator safei, const char* source) |