File diff r25941:1b35576e3e14 → r25942:fb8ed4e7ecae
src/network/network_admin.cpp
Show inline comments
 
@@ -73,12 +73,17 @@ ServerNetworkAdminSocketHandler::ServerN
 
 */
 
ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler()
 
{
 
	_network_admins_connected--;
 
	Debug(net, 3, "[admin] '{}' ({}) has disconnected", this->admin_name, this->admin_version);
 
	if (_redirect_console_to_admin == this->index) _redirect_console_to_admin = INVALID_ADMIN_ID;
 

	
 
	if (this->update_frequency[ADMIN_UPDATE_CONSOLE] & ADMIN_FREQUENCY_AUTOMATIC) {
 
		this->update_frequency[ADMIN_UPDATE_CONSOLE] = (AdminUpdateFrequency)0;
 
		DebugReconsiderSendRemoteMessages();
 
	}
 
}
 

	
 
/**
 
 * Whether a connection is allowed or not at this moment.
 
 * @return Whether the connection is allowed.
 
 */
 
@@ -685,12 +690,14 @@ NetworkRecvStatus ServerNetworkAdminSock
 
		Debug(net, 1, "[admin] Not supported update frequency {} ({}) from '{}' ({})", type, freq, this->admin_name, this->admin_version);
 
		return this->SendError(NETWORK_ERROR_ILLEGAL_PACKET);
 
	}
 

	
 
	this->update_frequency[type] = freq;
 

	
 
	if (type == ADMIN_UPDATE_CONSOLE) DebugReconsiderSendRemoteMessages();
 

	
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_POLL(Packet *p)
 
{
 
	if (this->status == ADMIN_STATUS_INACTIVE) return this->SendError(NETWORK_ERROR_NOT_EXPECTED);