aboutsummaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-04-20 18:58:59 +0000
committerGravatar brain2008-04-20 18:58:59 +0000
commite5131f92b3b88ae7646da9a9972b1bbb5855f874 (patch)
tree1ce2c5c79b7cd2a3369e89ec1a64dbc4059c3dab /src/command_parse.cpp
parentfix text in validate methods where option was moved to either performance or ... (diff)
Fix RemoveCommands to remove all commands (this function had some really odd removal logic?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9554 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp15
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)