summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-01-19 21:29:54 +0000
committerpeter1138 <peter1138@openttd.org>2006-01-19 21:29:54 +0000
commit016c49821676c17ceabd4c889942535fa9aa4d62 (patch)
treebb0c76f8156048e057ccdcee7573e3fba12a225b
parent102f9be296861b1300b085f7f6fcc52f6446a302 (diff)
downloadopenttd-016c49821676c17ceabd4c889942535fa9aa4d62.tar.xz
(svn r3411) - Fix: When changing the server password via the console, actually set the password as well as flag whether it is required.
-rw-r--r--console_cmds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/console_cmds.c b/console_cmds.c
index b521ac902..484925edc 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -1117,8 +1117,10 @@ DEF_CONSOLE_HOOK(ConHookServerPW)
if (strncmp(_network_server_password, "*", NETWORK_PASSWORD_LENGTH) == 0) {
_network_server_password[0] = '\0';
_network_game_info.use_password = 0;
- } else
+ } else {
+ ttd_strlcpy(_network_game_info.server_password, _network_server_password, sizeof(_network_server_password));
_network_game_info.use_password = 1;
+ }
return true;
}