summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-14 15:23:24 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-14 15:23:24 +0000
commit7866c42d8f80723d07cf38ed9413857164b55e00 (patch)
tree5724e915d38363a8d45f9346daa89a725ce766fc /include
parente2b57026ef100c2a6a7a1cb49e8c08f9065f24cd (diff)
Allow maxtargets to be bypassed in LoopCall for JOIN
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12255 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/command_parse.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/include/command_parse.h b/include/command_parse.h
index f374673f2..ac401ff67 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -101,33 +101,11 @@ class CoreExport CommandParser
* @param The number of items in the parameters list
* @param splithere The first parameter index to split as a comma seperated list
* @param extra The second parameter index to split as a comma seperated list
+ * @param usemax Limit the command to MaxTargets targets
* @return This function will return 1 when there are no more parameters to process. When this occurs, its
* caller should return without doing anything, otherwise it should continue into its main section of code.
*/
- int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, unsigned int extra);
-
- /** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
- * There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
- * We need a version which takes two potential lists for JOIN, because a JOIN may contain two lists of items at once,
- * the channel names and their keys as follows:
- *
- * JOIN #chan1,#chan2,#chan3 key1,,key3
- *
- * Therefore, we need to deal with both lists concurrently. The first instance of this method does that by creating
- * two instances of irc::commasepstream and reading them both together until the first runs out of tokens.
- * The second version is much simpler and just has the one stream to read, and is used in NAMES, WHOIS, PRIVMSG etc.
- * Both will only parse until they reach ServerInstance->Config->MaxTargets number of targets, to stop abuse via spam.
- *
- * @param user The user who sent the command
- * @param CommandObj the command object to call for each parameter in the list
- * @param parameters Parameter list as an array of array of char (that's not a typo).
- * @param The number of items in the parameters list
- * @param splithere The first parameter index to split as a comma seperated list
- * @param extra The second parameter index to split as a comma seperated list
- * @return This function will return 1 when there are no more parameters to process. When this occurs, its
- * caller should return without doing anything, otherwise it should continue into its main section of code.
- */
- int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere);
+ int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, unsigned int extra = -1, bool usemax = true);
/** Take a raw input buffer from a recvq, and process it on behalf of a user.
* @param buffer The buffer line to process