|
|
|
@ -748,7 +748,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCommand(const CommandPacke
|
|
|
|
|
* @param msg The actual message.
|
|
|
|
|
* @param data Arbitrary extra data.
|
|
|
|
|
*/
|
|
|
|
|
NetworkRecvStatus ServerNetworkGameSocketHandler::SendChat(NetworkAction action, ClientID client_id, bool self_send, const char *msg, int64 data)
|
|
|
|
|
NetworkRecvStatus ServerNetworkGameSocketHandler::SendChat(NetworkAction action, ClientID client_id, bool self_send, const char *msg, NetworkTextMessageData data)
|
|
|
|
|
{
|
|
|
|
|
if (this->status < STATUS_PRE_ACTIVE) return NETWORK_RECV_STATUS_OKAY;
|
|
|
|
|
|
|
|
|
@ -758,7 +758,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendChat(NetworkAction action,
|
|
|
|
|
p->Send_uint32(client_id);
|
|
|
|
|
p->Send_bool (self_send);
|
|
|
|
|
p->Send_string(msg);
|
|
|
|
|
p->Send_uint64(data);
|
|
|
|
|
data.send(p);
|
|
|
|
|
|
|
|
|
|
this->SendPacket(p);
|
|
|
|
|
return NETWORK_RECV_STATUS_OKAY;
|
|
|
|
@ -1265,7 +1265,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(Packet *p)
|
|
|
|
|
* @param data Arbitrary data.
|
|
|
|
|
* @param from_admin Whether the origin is an admin or not.
|
|
|
|
|
*/
|
|
|
|
|
void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, const char *msg, ClientID from_id, int64 data, bool from_admin)
|
|
|
|
|
void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, const char *msg, ClientID from_id, NetworkTextMessageData data, bool from_admin)
|
|
|
|
|
{
|
|
|
|
|
NetworkClientSocket *cs;
|
|
|
|
|
const NetworkClientInfo *ci, *ci_own, *ci_to;
|
|
|
|
@ -1392,7 +1392,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_CHAT(Packet *p)
|
|
|
|
|
char msg[NETWORK_CHAT_LENGTH];
|
|
|
|
|
|
|
|
|
|
p->Recv_string(msg, NETWORK_CHAT_LENGTH);
|
|
|
|
|
int64 data = p->Recv_uint64();
|
|
|
|
|
NetworkTextMessageData data;
|
|
|
|
|
data.recv(p);
|
|
|
|
|
|
|
|
|
|
NetworkClientInfo *ci = this->GetInfo();
|
|
|
|
|
switch (action) {
|
|
|
|
|