summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-02-10 15:26:47 +0000
committersmatz <smatz@openttd.org>2010-02-10 15:26:47 +0000
commit91988f2722c7a6e3b3666d786cc6d34f99163767 (patch)
tree4312481d009b875e65f3b6221673aea53e36ea21 /src
parent2329eacfe8124cb70c1f4dcf6c38794ef1acbfdf (diff)
downloadopenttd-91988f2722c7a6e3b3666d786cc6d34f99163767.tar.xz
(svn r19077) -Codechange: remove company_pw from console vars
Diffstat (limited to 'src')
-rw-r--r--src/console_cmds.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 8989b340f..2f8397e0b 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1552,14 +1552,14 @@ DEF_CONSOLE_CMD(ConCompanyPassword)
return true;
}
- if (argc != 1) return false;
+ if (argc != 2) return false;
if (!Company::IsValidID(_local_company)) {
IConsoleError("You have to own a company to make use of this command.");
return false;
}
- const char *password = NetworkChangeCompanyPassword(argv[0]);
+ const char *password = NetworkChangeCompanyPassword(argv[1]);
if (StrEmpty(password)) {
IConsolePrintF(CC_WARNING, "Company password cleared");
@@ -1904,10 +1904,9 @@ void IConsoleStdLibRegister()
IConsoleCmdHookAdd("unpause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
/*** Networking variables ***/
- IConsoleVarStringRegister("company_pw", NULL, 0, "Set a password for your company, so no one without the correct password can join. Use '*' to clear the password");
- IConsoleVarHookAdd("company_pw", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
- IConsoleVarProcAdd("company_pw", ConCompanyPassword);
- IConsoleAliasRegister("company_password", "company_pw %+");
+ IConsoleCmdRegister("company_pw", ConCompanyPassword);
+ IConsoleCmdHookAdd("company_pw", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
+ IConsoleAliasRegister("company_password", "company_pw %+");
IConsoleAliasRegister("net_frame_freq", "setting frame_freq %+");
IConsoleAliasRegister("net_sync_freq", "setting sync_freq %+");