File diff r25923:d1582e09c6ed → r25924:31e3cdb1821b
src/network/network_server.cpp
Show inline comments
 
@@ -305,7 +305,7 @@ NetworkRecvStatus ServerNetworkGameSocke
 
/* static */ bool ServerNetworkGameSocketHandler::AllowConnection()
 
{
 
	extern byte _network_clients_connected;
 
	bool accept = _network_clients_connected < MAX_CLIENTS && _network_game_info.clients_on < _settings_client.network.max_clients;
 
	bool accept = _network_clients_connected < MAX_CLIENTS;
 

	
 
	/* We can't go over the MAX_CLIENTS limit here. However, the
 
	 * pool must have place for all clients and ourself. */
 
@@ -805,6 +805,11 @@ NetworkRecvStatus ServerNetworkGameSocke
 
		return this->SendError(NETWORK_ERROR_NOT_EXPECTED);
 
	}
 

	
 
	if (_network_game_info.clients_on >= _settings_client.network.max_clients) {
 
		/* Turns out we are full. Inform the user about this. */
 
		return this->SendError(NETWORK_ERROR_FULL);
 
	}
 

	
 
	std::string client_revision = p->Recv_string(NETWORK_REVISION_LENGTH);
 
	uint32 newgrf_version = p->Recv_uint32();