From dd61b852e50a6a79c12214e2a9fb15c4ef2cf42b Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:33:48 +0000 Subject: Translate TR_NICK back from UID on mode parse git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11716 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index 9c608c37a..2089ad140 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -459,9 +459,16 @@ void ModeParser::Process(const std::vector& parameters, User *user, if (pcnt) { + TranslateType tt = mh->GetTranslateType(); + if (tt == TR_NICK) + { + User* u = ServerInstance->FindNick(parameter); + if (u) + parameter = u->nick; + } output_parameters << " " << parameter; LastParseParams.push_back(parameter); - LastParseTranslate.push_back(mh->GetTranslateType()); + LastParseTranslate.push_back(tt); } if ( (output_mode.length() + output_parameters.str().length() > 450) -- cgit v1.2.3