Add more debug logging for ServerListPacket [skip ci]

This commit is contained in:
Akkadius 2019-07-10 00:45:40 -05:00
parent 2a927c5c80
commit 7b808ee6e0
2 changed files with 25 additions and 2 deletions

View File

@ -142,13 +142,36 @@ EQApplicationPacket *ServerManager::CreateServerListPacket(Client *client, uint3
std::string world_ip = (*iter)->GetConnection()->Handle()->RemoteIP(); std::string world_ip = (*iter)->GetConnection()->Handle()->RemoteIP();
if (world_ip == client_ip) { if (world_ip == client_ip) {
packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetLocalIP().size() + 24; packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetLocalIP().size() + 24;
LogDebug(
"CreateServerListPacket | Building list entry | Client [{0}] IP [{1}] Server Long Name [{2}] Server IP [{3}] (Local)",
client->GetAccountName(),
client_ip,
(*iter)->GetServerLongName(),
(*iter)->GetLocalIP()
);
} }
else if (IpUtil::IsIpInPrivateRfc1918(client_ip)) { else if (IpUtil::IsIpInPrivateRfc1918(client_ip)) {
LogInfo("Client is requesting server list from a local address [{0}]", client_ip);
packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetLocalIP().size() + 24; packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetLocalIP().size() + 24;
LogDebug(
"CreateServerListPacket | Building list entry | Client [{0}] IP [{1}] Server Long Name [{2}] Server IP [{3}] (Local)",
client->GetAccountName(),
client_ip,
(*iter)->GetServerLongName(),
(*iter)->GetLocalIP()
);
} }
else { else {
packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetRemoteIP().size() + 24; packet_size += (*iter)->GetServerLongName().size() + (*iter)->GetRemoteIP().size() + 24;
LogDebug(
"CreateServerListPacket | Building list entry | Client [{0}] IP [{1}] Server Long Name [{2}] Server IP [{3}] (Remote)",
client->GetAccountName(),
client_ip,
(*iter)->GetServerLongName(),
(*iter)->GetRemoteIP()
);
} }
server_count++; server_count++;

View File

@ -416,7 +416,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
} }
is_player_zoning = (login_info->zoning == 1); is_player_zoning = (login_info->zoning == 1);
uint32 id = std::stoi(name); uint32 id = std::stoi(name);
if (id == 0) { if (id == 0) {
LogWarning("Receiving Login Info Packet from Client | account_id is 0 - disconnecting"); LogWarning("Receiving Login Info Packet from Client | account_id is 0 - disconnecting");