summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-09-04 12:27:04 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-09-04 12:27:04 +0200
commit679411e500fb0c81ad403edb4aae54d3660a098d (patch)
tree919f9be6bbb87079098ae446edfaffb4f7f5dbff /include
parentdb248e7d99636809a88f0ddb5ccf9a8034cbdf36 (diff)
Let callers customize the begin/end positions for ModeParser::ModeParamsToChangeList()
This helps spanningtree when it deals with a vector of parameters where the modes begin at different positions
Diffstat (limited to 'include')
-rw-r--r--include/mode.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mode.h b/include/mode.h
index 868f3437d..de92e8ec5 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -716,8 +716,12 @@ class CoreExport ModeParser : public fakederef<ModeParser>
* @param parameters List of strings describing the mode change to convert to a ChangeList.
* Must be using the same format as the parameters of a MODE command.
* @param changelist ChangeList object to populate.
+ * @param beginindex Index of the first element that is part of the MODE list in the parameters
+ * container. Defaults to 1.
+ * @param endindex Index of the first element that is not part of the MODE list. By default,
+ * the entire container is considered part of the MODE list.
*/
- void ModeParamsToChangeList(User* user, ModeType type, const std::vector<std::string>& parameters, Modes::ChangeList& changelist);
+ void ModeParamsToChangeList(User* user, ModeType type, const std::vector<std::string>& parameters, Modes::ChangeList& changelist, unsigned int beginindex = 1, unsigned int endindex = UINT_MAX);
/** Find the mode handler for a given mode name and type.
* @param modename The mode name to search for.