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

Method SendClientUpdate

src/network/network_admin.cpp:260–271  ·  view source on GitHub ↗

* Send an update for some client's information. * @param ci The information about a client. */

Source from the content-addressed store, hash-verified

258 * @param ci The information about a client.
259 */
260NetworkRecvStatus ServerNetworkAdminSocketHandler::SendClientUpdate(const NetworkClientInfo *ci)
261{
262 auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_CLIENT_UPDATE);
263
264 p->Send_uint32(ci->client_id);
265 p->Send_string(ci->client_name);
266 p->Send_uint8 (ci->client_playas);
267
268 this->SendPacket(std::move(p));
269
270 return NETWORK_RECV_STATUS_OKAY;
271}
272
273/**
274 * Tell the admin that a client quit.

Callers 1

NetworkAdminClientUpdateFunction · 0.80

Calls 4

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

Tested by

no test coverage detected