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

Function NetworkAdminClientInfo

src/network/network_admin.cpp:880–890  ·  view source on GitHub ↗

* Notify the admin network of a new client (if they did opt in for the respective update). * @param cs the client info. * @param new_client if this is a new client, send the respective packet too. */

Source from the content-addressed store, hash-verified

878 * @param new_client if this is a new client, send the respective packet too.
879 */
880void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client)
881{
882 for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) {
883 if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO].Test(AdminUpdateFrequency::Automatic)) {
884 as->SendClientInfo(cs, cs->GetInfo());
885 if (new_client) {
886 as->SendClientJoin(cs->client_id);
887 }
888 }
889 }
890}
891
892/**
893 * Notify the admin network of a client update (if they did opt in for the respective update).

Callers 1

Receive_CLIENT_MAP_OKMethod · 0.85

Calls 4

TestMethod · 0.80
SendClientJoinMethod · 0.80
SendClientInfoMethod · 0.45
GetInfoMethod · 0.45

Tested by

no test coverage detected