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

Function NetworkAdminCmdLogging

src/network/network_admin.cpp:1036–1045  ·  view source on GitHub ↗

* Distribute CommandPacket details over the admin network for logging purposes. * @param owner The owner of the CommandPacket (who sent us the CommandPacket). * @param cp The CommandPacket to be distributed. */

Source from the content-addressed store, hash-verified

1034 * @param cp The CommandPacket to be distributed.
1035 */
1036void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacket &cp)
1037{
1038 ClientID client_id = owner == nullptr ? _network_own_client_id : owner->client_id;
1039
1040 for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) {
1041 if (as->update_frequency[ADMIN_UPDATE_CMD_LOGGING].Test(AdminUpdateFrequency::Automatic)) {
1042 as->SendCmdLogging(client_id, cp);
1043 }
1044 }
1045}
1046
1047/**
1048 * Send a Welcome packet to all connected admins

Callers 1

DistributeQueueFunction · 0.85

Calls 2

TestMethod · 0.80
SendCmdLoggingMethod · 0.80

Tested by

no test coverage detected