- std::map<irc::string, bool> dupes;
-
- /* Create two lists, one for channel names, one for keys
- */
- irc::commasepstream items1(parameters[splithere]);
- irc::commasepstream items2(parameters[extra]);
- std::string extrastuff;
- std::string item;
- unsigned int max = 0;
-
- /* Attempt to iterate these lists and call the command objech
- * which called us, for every parameter pair until there are
- * no more left to parse.
- */
- 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]);
-
- if (!items2.GetToken(extrastuff))
- extrastuff = "";
-
- new_parameters[splithere] = item.c_str();
- new_parameters[extra] = extrastuff.c_str();
-
- CommandObj->Handle(new_parameters, user);
-
- dupes[item.c_str()] = true;
- }
- }
- return 1;
-}
-
-int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere)
-{
- if (splithere >= parameters.size())
- return 0;