diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 15:14:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 15:14:27 +0000 |
commit | cd2406617f5c0c3c5e7f53519ea47b9178b7802a (patch) | |
tree | 30ec5a594820f6f86d102b641da6b135b9ae5ee6 /src/command_parse.cpp | |
parent | 4bbca0643b56f26f73a05462d226b2dd8871626b (diff) |
More translation stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7888 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index fb89fd7ad..9cef16ef4 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -594,3 +594,31 @@ void CommandParser::SetupCommandTable(userrec* user) this->CreateCommand(new cmd_reload(ServerInstance)); } +int CommandParser::TranslateUIDs(TranslateType to, const std::string &source, std::string &dest) +{ + userrec* user = NULL; + switch (to) + { + case TR_NICK: + /* Translate single nickname */ + user = ServerInstance->FindNick(source); + if (user) + dest = user->uuid; + else + dest = source; + break; + case TR_NICKLIST: + /* Translate comma seperated list of nicknames */ + break; + case TR_SPACENICKLIST: + /* Translate space seperated list of nicknames */ + break; + case TR_END: + case TR_TEXT: + default: + /* Do nothing */ + dest = source; + break; + } +} + |