mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-07 21:09:40 +01:00
Fix: inconsistent check for client authorized status
This commit is contained in:
parent
ffb795e52f
commit
3b614d0650
@ -248,7 +248,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta
|
||||
|
||||
/* Inform other clients of this... strange leaving ;) */
|
||||
for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) {
|
||||
if (new_cs->status > STATUS_AUTHORIZED && this != new_cs) {
|
||||
if (new_cs->status >= STATUS_AUTHORIZED && this != new_cs) {
|
||||
new_cs->SendErrorQuit(this->client_id, NETWORK_ERROR_CONNECTION_LOST);
|
||||
}
|
||||
}
|
||||
@ -366,7 +366,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendError(NetworkErrorCode err
|
||||
StringID strid = GetNetworkErrorMsg(error);
|
||||
|
||||
/* Only send when the current client was in game */
|
||||
if (this->status > STATUS_AUTHORIZED) {
|
||||
if (this->status >= STATUS_AUTHORIZED) {
|
||||
std::string client_name = this->GetClientName();
|
||||
|
||||
Debug(net, 1, "'{}' made an error and has been disconnected: {}", client_name, GetString(strid));
|
||||
|
Loading…
Reference in New Issue
Block a user