[Server] Accept clients with wrong password on servers with no password

master
David Cernat 6 years ago
parent eb52babf29
commit e70fd2cf3a

@ -111,12 +111,20 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
}
if (player->serverPassword != serverPassword)
{
if (isPassworded())
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Wrong server password %s used by client at %s",
player->serverPassword.c_str(), packet->systemAddress.ToString());
kickPlayer(player->guid);
return;
}
else
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Client at %s tried to join using password, despite the server not being passworded",
packet->systemAddress.ToString());
}
}
player->setHandshake();
return;
}

Loading…
Cancel
Save