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

Function NetworkAdminConsole

src/network/network_admin.cpp:1009–1016  ·  view source on GitHub ↗

* Send console to the admin network (if they did opt in for the respective update). * @param origin the origin of the message. * @param string the message as printed on the console. */

Source from the content-addressed store, hash-verified

1007 * @param string the message as printed on the console.
1008 */
1009void NetworkAdminConsole(std::string_view origin, std::string_view string)
1010{
1011 for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) {
1012 if (as->update_frequency[ADMIN_UPDATE_CONSOLE].Test(AdminUpdateFrequency::Automatic)) {
1013 as->SendConsole(origin, string);
1014 }
1015 }
1016}
1017
1018/**
1019 * Send GameScript JSON to the admin network (if they did opt in for the respective update).

Callers 2

DebugSendRemoteMessagesFunction · 0.85
IConsolePrintFunction · 0.85

Calls 2

TestMethod · 0.80
SendConsoleMethod · 0.80

Tested by

no test coverage detected