From 526f5a4a02882b19056fe755dff1f64b764ff313 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 6 Mar 2009 22:28:57 +0000 Subject: 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 --- include/command_parse.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/command_parse.h') 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 to, const std::string &source, std::string &dest); }; /** Command handler class for the RELOAD command. -- cgit v1.2.3