ZnoteAAC
ZnoteAAC copied to clipboard
proxy support
That way if anyone have proxy server (in USA, Brazil or Austrialia for example) he can just uncomment world entry creation + player proxy entry. Because Cipsoft client won't allow for two the same character names, I'm adding suffix [proxy], so it require changes in engine to ignore that name part:
https://github.com/otland/forgottenserver/blob/master/src/protocolgame.cpp#L433
std::string characterName = msg.getString();
to
std::string rawCharacterName = msg.getString();
std::size_t proxyPos = rawCharacterName.find(" [");
std::string characterName = proxyPos != std::string::npos ? rawCharacterName.substr(0, proxyPos) : rawCharacterName;
Wouldn't it be more organized to use a prefix instead of a suffix? Could you link me the code for this proxy system?