Change chat arbitrary data field from an int64 to a struct.

This commit is contained in:
Jonathan G Rennison
2017-03-03 22:32:33 +00:00
parent c70a60fd18
commit 3001595916
11 changed files with 38 additions and 21 deletions

View File

@@ -473,7 +473,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyStats()
* @param msg The actual message.
* @param data Arbitrary extra data.
*/
NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action, DestType desttype, ClientID client_id, const char *msg, int64 data)
NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action, DestType desttype, ClientID client_id, const char *msg, NetworkTextMessageData data)
{
Packet *p = new Packet(ADMIN_PACKET_SERVER_CHAT);
@@ -481,7 +481,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action
p->Send_uint8 (desttype);
p->Send_uint32(client_id);
p->Send_string(msg);
p->Send_uint64(data);
data.send(p);
this->SendPacket(p);
return NETWORK_RECV_STATUS_OKAY;
@@ -935,7 +935,7 @@ void NetworkAdminCompanyRemove(CompanyID company_id, AdminCompanyRemoveReason bc
/**
* Send chat to the admin network (if they did opt in for the respective update).
*/
void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_id, const char *msg, int64 data, bool from_admin)
void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_id, const char *msg, NetworkTextMessageData data, bool from_admin)
{
if (from_admin) return;