From c4836bbd70223842a9df4f412444ece44d9b1147 Mon Sep 17 00:00:00 2001 From: darkvater Date: Wed, 22 Dec 2004 23:24:53 +0000 Subject: (svn r1239) -Feature: Added gui option of setting company password. It can be found in the 'company information' window -Spiced up 'set company_pw' a bit, where if no pw is typed, it shows the current one. -Added a space between company name and player; looks better --- console_cmds.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'console_cmds.c') diff --git a/console_cmds.c b/console_cmds.c index e534ef25c..11f9dffc0 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -682,17 +682,11 @@ DEF_CONSOLE_CMD(ConSet) { return NULL; } if (argc == 3) { - if (strncmp(argv[2], "*", NETWORK_PASSWORD_LENGTH) == 0) { - _network_player_info[_local_player].password[0] = '\0'; - } else { - ttd_strlcpy(_network_player_info[_local_player].password, argv[2], sizeof(_network_player_info[_local_player].password)); - } - if (!_network_server) - SEND_COMMAND(PACKET_CLIENT_SET_PASSWORD)(_network_player_info[_local_player].password); - IConsolePrintF(_iconsole_color_warning, "Company protected with '%s'", _network_player_info[_local_player].password); + NetworkChangeCompanyPassword(argv[2]); } else { - IConsolePrint(_iconsole_color_default, "'set company_pw' sets a password on your company, so no-one without the correct password can join."); + IConsolePrint(_iconsole_color_default, "'set company_pw' sets a password for your company, so no-one without the correct password can join."); IConsolePrint(_iconsole_color_warning, "Usage: set company_pw \"\". Use * as to set no password."); + IConsolePrintF(_iconsole_color_warning, "Current password is: '%s'", _network_player_info[_local_player].password); } return NULL; } -- cgit v1.2.3-54-g00ecf