forked from mirror/OpenTTD
(svn r25587) -Add FS#5643: Conclude rcon output sent to admin clients with an RCON_END packet (Xaroth)
This commit is contained in:
@@ -480,6 +480,20 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a notification indicating the rcon command has completed.
|
||||
* @param command The original command sent.
|
||||
*/
|
||||
NetworkRecvStatus ServerNetworkAdminSocketHandler::SendRconEnd(const char *command)
|
||||
{
|
||||
Packet *p = new Packet(ADMIN_PACKET_SERVER_RCON_END);
|
||||
|
||||
p->Send_string(command);
|
||||
this->SendPacket(p);
|
||||
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the reply of an rcon command.
|
||||
* @param colour The colour of the text.
|
||||
@@ -509,7 +523,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_RCON(Packet *p)
|
||||
_redirect_console_to_admin = this->index;
|
||||
IConsoleCmdExec(command);
|
||||
_redirect_console_to_admin = INVALID_ADMIN_ID;
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
return this->SendRconEnd(command);
|
||||
}
|
||||
|
||||
NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_GAMESCRIPT(Packet *p)
|
||||
|
Reference in New Issue
Block a user