mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
[Server] Accept clients with wrong password on servers with no password
This commit is contained in:
parent
eb52babf29
commit
e70fd2cf3a
@ -112,10 +112,18 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||
|
||||
if (player->serverPassword != serverPassword)
|
||||
{
|
||||
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;
|
||||
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…
x
Reference in New Issue
Block a user