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

Function ConRcon

src/console_cmds.cpp:868–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868static bool ConRcon(std::span<std::string_view> argv)
869{
870 if (argv.empty()) {
871 IConsolePrint(CC_HELP, "Remote control the server from another client. Usage: 'rcon <password> <command>'.");
872 IConsolePrint(CC_HELP, "Remember to enclose the command in quotes, otherwise only the first parameter is sent.");
873 IConsolePrint(CC_HELP, "When your client's public key is in the 'authorized keys' for 'rcon', the password is not checked and may be '*'.");
874 return true;
875 }
876
877 if (argv.size() < 3) return false;
878
879 if (_network_server) {
880 IConsoleCmdExec(argv[2]);
881 } else {
882 NetworkClientSendRcon(argv[1], argv[2]);
883 }
884 return true;
885}
886
887static bool ConStatus(std::span<std::string_view> argv)
888{

Callers

nothing calls this directly

Calls 5

IConsoleCmdExecFunction · 0.85
NetworkClientSendRconFunction · 0.85
IConsolePrintFunction · 0.70
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected