summaryrefslogtreecommitdiff
path: root/include/command_parse.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
commit526f5a4a02882b19056fe755dff1f64b764ff313 (patch)
tree6a9e92e4f3f7088b18dcdde360d07c911ee174df /include/command_parse.h
parenteacd707421be4f2612df9bde4517649061bb062e (diff)
Construct explicit parameter type list for MODE parameters
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because usually, if anything in the list parsed as a nick, then it was a nick. However, some modes like +k and +g allow free-form text, which could also resolve as a nick. Add extra parameters to allow modes to specify their TranslateType, defaulting to TR_TEXT. This fixes bug #757, found by Taros git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/command_parse.h')
-rw-r--r--include/command_parse.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/command_parse.h b/include/command_parse.h
index b3ae3236a..21dae89dd 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -202,6 +202,8 @@ class CoreExport CommandParser : public classbase
* @return returns the number of substitutions made. Will always be 0 or 1 for TR_TEXT and 0..n for other types.
*/
int TranslateUIDs(TranslateType to, const std::string &source, std::string &dest);
+
+ int TranslateUIDs(const std::vector<TranslateType> to, const std::string &source, std::string &dest);
};
/** Command handler class for the RELOAD command.