From 73d4e90275b7bdbdd93f157ff3413fd12fcf212c Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Thu, 14 Jul 2022 02:17:51 -0500 Subject: [PATCH] [World] Add more descriptive LS auth erroring (#2293) --- world/login_server.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/world/login_server.cpp b/world/login_server.cpp index 3948a9c65..b4ab5b61f 100644 --- a/world/login_server.cpp +++ b/world/login_server.cpp @@ -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)