- /* Only one commasepstream here */
- irc::commasepstream items1(parameters[splithere]);
- std::string item;
- unsigned int max = 0;
-
- /* Parse the commasepstream until there are no tokens remaining.
- * Each token we parse out, call the command handler that called us
- * with it
- */
- while (items1.GetToken(item) && (max++ < ServerInstance->Config->MaxTargets))
- {
- if (dupes.find(item.c_str()) == dupes.end())
- {
- std::vector<std::string> new_parameters;
-
- for (unsigned int t = 0; (t < parameters.size()) && (t < MAXPARAMETERS); t++)
- new_parameters.push_back(parameters[t]);
-
- new_parameters[splithere] = item.c_str();
-
- /* Execute the command handler. */
- CommandObj->Handle(new_parameters, user);
-
- dupes.insert(item.c_str());
- }
- }
- /* By returning 1 we tell our caller that nothing is to be done,
- * as all the previous calls handled the data. This makes the parent
- * return without doing any processing.
- */
- return 1;
-}
-
-bool CommandParser::IsValidCommand(const std::string &commandname, unsigned int pcnt, User * user)
-{
- Commandtable::iterator n = cmdlist.find(commandname);
-
- if (n != cmdlist.end())
- {
- if ((pcnt >= n->second->min_params))
- {
- if (IS_LOCAL(user) && n->second->flags_needed)