MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SendChat

Method SendChat

src/network/network_admin.cpp:443–455  ·  view source on GitHub ↗

* Send a chat message. * @param action The action associated with the message. * @param desttype The destination type. * @param client_id The origin of the chat message. * @param msg The actual message. * @param data Arbitrary extra data. */

Source from the content-addressed store, hash-verified

441 * @param data Arbitrary extra data.
442 */
443NetworkRecvStatus ServerNetworkAdminSocketHandler::SendChat(NetworkAction action, DestType desttype, ClientID client_id, std::string_view msg, int64_t data)
444{
445 auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_CHAT);
446
447 p->Send_uint8 (action);
448 p->Send_uint8 (desttype);
449 p->Send_uint32(client_id);
450 p->Send_string(msg);
451 p->Send_uint64(data);
452
453 this->SendPacket(std::move(p));
454 return NETWORK_RECV_STATUS_OKAY;
455}
456
457/**
458 * Send a notification indicating the rcon command has completed.

Callers 1

NetworkAdminChatFunction · 0.45

Calls 5

Send_uint32Method · 0.80
Send_stringMethod · 0.80
Send_uint64Method · 0.80
Send_uint8Method · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected