diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:33:48 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:33:48 +0000 |
commit | dd61b852e50a6a79c12214e2a9fb15c4ef2cf42b (patch) | |
tree | 40aca8ba62767c987ee64bcd43c23f684ad82a40 /src/mode.cpp | |
parent | 75a158fe6361319628f6145b7b3b3458c55ac85a (diff) |
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
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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<std::string>& 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) |