+ this->CreateCommand(new CommandReload(ServerInstance));
+}
+
+int CommandParser::TranslateUIDs(const std::deque<TranslateType> to, const std::deque<std::string> &source, std::string &dest)
+{
+ std::deque<std::string>::const_iterator items = source.begin();
+ std::deque<TranslateType>::const_iterator types = to.begin();
+ User* user = NULL;
+ int translations = 0;
+ dest.clear();
+
+ while (items != source.end() && types != to.end())
+ {
+ TranslateType t = *types;
+ std::string item = *items;
+ types++;
+ items++;
+
+ switch (t)
+ {
+ case TR_NICK:
+ /* Translate single nickname */
+ user = ServerInstance->FindNick(item);
+ if (user)
+ {
+ dest.append(user->uuid);
+ translations++;
+ }
+ else
+ dest.append(item);
+ break;
+ break;
+ case TR_END:
+ case TR_TEXT:
+ default:
+ /* Do nothing */
+ dest.append(item);
+ break;
+ }
+ dest.append(" ");
+ }
+
+ if (!dest.empty())
+ dest.erase(dest.end() - 1);
+ return translations;