equal
deleted
inserted
replaced
1324 ttd_strlcpy(_network_game_info.rcon_password, _network_rcon_password, sizeof(_network_game_info.rcon_password)); |
1324 ttd_strlcpy(_network_game_info.rcon_password, _network_rcon_password, sizeof(_network_game_info.rcon_password)); |
1325 |
1325 |
1326 return true; |
1326 return true; |
1327 } |
1327 } |
1328 |
1328 |
|
1329 extern void HashCurrentCompanyPassword(); |
|
1330 |
1329 /* Also use from within player_gui to change the password graphically */ |
1331 /* Also use from within player_gui to change the password graphically */ |
1330 bool NetworkChangeCompanyPassword(byte argc, char *argv[]) |
1332 bool NetworkChangeCompanyPassword(byte argc, char *argv[]) |
1331 { |
1333 { |
1332 if (argc == 0) { |
1334 if (argc == 0) { |
1333 if (!IsValidPlayer(_local_player)) return true; // dedicated server |
1335 if (!IsValidPlayer(_local_player)) return true; // dedicated server |
1344 |
1346 |
1345 if (strcmp(argv[0], "*") == 0) argv[0][0] = '\0'; |
1347 if (strcmp(argv[0], "*") == 0) argv[0][0] = '\0'; |
1346 |
1348 |
1347 ttd_strlcpy(_network_player_info[_local_player].password, argv[0], sizeof(_network_player_info[_local_player].password)); |
1349 ttd_strlcpy(_network_player_info[_local_player].password, argv[0], sizeof(_network_player_info[_local_player].password)); |
1348 |
1350 |
1349 if (!_network_server) |
1351 if (!_network_server) { |
1350 SEND_COMMAND(PACKET_CLIENT_SET_PASSWORD)(_network_player_info[_local_player].password); |
1352 SEND_COMMAND(PACKET_CLIENT_SET_PASSWORD)(_network_player_info[_local_player].password); |
|
1353 } else { |
|
1354 HashCurrentCompanyPassword(); |
|
1355 } |
1351 |
1356 |
1352 IConsolePrintF(_icolour_warn, "'company_pw' changed to: %s", _network_player_info[_local_player].password); |
1357 IConsolePrintF(_icolour_warn, "'company_pw' changed to: %s", _network_player_info[_local_player].password); |
1353 |
1358 |
1354 return true; |
1359 return true; |
1355 } |
1360 } |