[World] Add more descriptive LS auth erroring (#2293)

This commit is contained in:
Chris Miles 2022-07-14 02:17:51 -05:00 committed by GitHub
parent f7923457fd
commit 73d4e90275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,10 +294,27 @@ void LoginServer::ProcessLSFatalError(uint16_t opcode, EQ::Net::Packet &p)
const WorldConfig *Config = WorldConfig::get();
LogNetcode("Received ServerPacket from LS OpCode {:#04x}", opcode);
LogInfo("Login server responded with FatalError");
std::string error;
std::string reason;
if (p.Length() > 1) {
LogError("Error [{}]", (const char *) p.Data());
error = fmt::format("{}", (const char *) p.Data());
}
if (error.find("Worldserver Account / Password INVALID") != std::string::npos) {
reason = "Usually this indicates you do not have a valid [account] and [password] (worldserver) account associated with your loginserver configuration. ";
if (fmt::format("{}", m_loginserver_address).find("login.eqemulator.net") != std::string::npos) {
reason += "For Legacy EQEmulator connections, you need to register your server @ http://www.eqemulator.org/account/?LS";
}
}
LogInfo(
"Login server [{}:{}] responded with fatal error [{}] {}\n",
m_loginserver_address,
m_loginserver_port,
error,
reason
);
}
void LoginServer::ProcessSystemwideMessage(uint16_t opcode, EQ::Net::Packet &p)