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

Function NetworkAdminChat

src/network/network_admin.cpp:982–991  ·  view source on GitHub ↗

* Send chat to the admin network (if they did opt in for the respective update). */

Source from the content-addressed store, hash-verified

980 * Send chat to the admin network (if they did opt in for the respective update).
981 */
982void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_id, std::string_view msg, int64_t data, bool from_admin)
983{
984 if (from_admin) return;
985
986 for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) {
987 if (as->update_frequency[ADMIN_UPDATE_CHAT].Test(AdminUpdateFrequency::Automatic)) {
988 as->SendChat(action, desttype, client_id, msg, data);
989 }
990 }
991}
992
993/**
994 * Pass the rcon reply to the admin.

Callers 1

NetworkServerSendChatFunction · 0.85

Calls 2

TestMethod · 0.80
SendChatMethod · 0.45

Tested by

no test coverage detected