summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-04-20 19:00:08 +0000
committerGravatar brain2008-04-20 19:00:08 +0000
commite3175d07479bc390cb67079d4f825eb68ec40c58 (patch)
tree5ff70f7eb630ffbd89d53c788658891dffbb0ec0 /src/command_parse.cpp
parentRebase modules in 1.1 too. This uses a post build event that does not involve... (diff)
Fix RemoveCommands to remove all commands (this function had some really odd removal logic?)
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@9555 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp14
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;