| 1148 | } |
| 1149 | |
| 1150 | static bool ConNetworkConnect(std::span<std::string_view> argv) |
| 1151 | { |
| 1152 | if (argv.empty()) { |
| 1153 | IConsolePrint(CC_HELP, "Connect to a remote OTTD server and join the game. Usage: 'connect <ip>'."); |
| 1154 | IConsolePrint(CC_HELP, "IP can contain port and company: 'IP[:Port][#Company]', eg: 'server.ottd.org:443#2'."); |
| 1155 | IConsolePrint(CC_HELP, "Company #255 is spectator all others are a certain company with Company 1 being #1."); |
| 1156 | return true; |
| 1157 | } |
| 1158 | |
| 1159 | if (argv.size() < 2) return false; |
| 1160 | |
| 1161 | return NetworkClientConnectGame(argv[1], COMPANY_NEW_COMPANY); |
| 1162 | } |
| 1163 | |
| 1164 | /********************************* |
| 1165 | * script file console commands |
nothing calls this directly
no test coverage detected