~ubuntu-branches/ubuntu/oneiric/inspircd/oneiric-security

« back to all changes in this revision

Viewing changes to src/command_parse.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Darren Blaber
  • Date: 2008-04-21 12:51:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080421125101-m6lqhtn1wna8u2go
Tags: 1.1.19+dfsg-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
 
196
196
                        new_parameters[splithere] = item.c_str();
197
197
 
198
 
                        parameters[splithere] = item.c_str();
199
 
 
200
198
                        /* Execute the command handler over and over. If someone pulls our user
201
199
                         * record out from under us (e.g. if we /kill a comma sep list, and we're
202
200
                         * in that list ourselves) abort if we're gone.
381
379
        }
382
380
}
383
381
 
384
 
bool CommandParser::RemoveCommands(const char* source)
 
382
void CommandParser::RemoveCommands(const char* source)
385
383
{
386
384
        command_table::iterator i,safei;
387
 
        for (i = cmdlist.begin(); i != cmdlist.end(); i++)
 
385
        for (i = cmdlist.begin(); i != cmdlist.end();)
388
386
        {
389
387
                safei = i;
390
 
                safei++;
391
 
                if (safei != cmdlist.end())
392
 
                {
393
 
                        RemoveCommand(safei, source);
394
 
                }
395
 
        }
396
 
        safei = cmdlist.begin();
397
 
        if (safei != cmdlist.end())
398
 
        {
 
388
                i++;
399
389
                RemoveCommand(safei, source);
400
390
        }
401
 
        return true;
 
391
        return;
402
392
}
403
393
 
404
394
void CommandParser::RemoveCommand(command_table::iterator safei, const char* source)