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

Function NetworkAdminCompanyUpdate

src/network/network_admin.cpp:955–964  ·  view source on GitHub ↗

* Notify the admin network of company updates. * @param company company of which updates are going to be sent into the admin network. */

Source from the content-addressed store, hash-verified

953 * @param company company of which updates are going to be sent into the admin network.
954 */
955void NetworkAdminCompanyUpdate(const Company *company)
956{
957 if (company == nullptr) return;
958
959 for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) {
960 if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != AdminUpdateFrequency::Automatic) continue;
961
962 as->SendCompanyUpdate(company);
963 }
964}
965
966/**
967 * Notify the admin network of a company to be removed (including the reason why).

Callers 1

CompanyAdminUpdateFunction · 0.85

Calls 1

SendCompanyUpdateMethod · 0.80

Tested by

no test coverage detected