(svn r19077) -Codechange: remove company_pw from console vars

This commit is contained in:
smatz
2010-02-10 15:26:47 +00:00
parent 01f8bc2578
commit 223aaf88a4

View File

@@ -1552,14 +1552,14 @@ DEF_CONSOLE_CMD(ConCompanyPassword)
return true; return true;
} }
if (argc != 1) return false; if (argc != 2) return false;
if (!Company::IsValidID(_local_company)) { if (!Company::IsValidID(_local_company)) {
IConsoleError("You have to own a company to make use of this command."); IConsoleError("You have to own a company to make use of this command.");
return false; return false;
} }
const char *password = NetworkChangeCompanyPassword(argv[0]); const char *password = NetworkChangeCompanyPassword(argv[1]);
if (StrEmpty(password)) { if (StrEmpty(password)) {
IConsolePrintF(CC_WARNING, "Company password cleared"); IConsolePrintF(CC_WARNING, "Company password cleared");
@@ -1904,9 +1904,8 @@ void IConsoleStdLibRegister()
IConsoleCmdHookAdd("unpause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly); IConsoleCmdHookAdd("unpause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
/*** Networking variables ***/ /*** 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"); IConsoleCmdRegister("company_pw", ConCompanyPassword);
IConsoleVarHookAdd("company_pw", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork); IConsoleCmdHookAdd("company_pw", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
IConsoleVarProcAdd("company_pw", ConCompanyPassword);
IConsoleAliasRegister("company_password", "company_pw %+"); IConsoleAliasRegister("company_password", "company_pw %+");
IConsoleAliasRegister("net_frame_freq", "setting frame_freq %+"); IConsoleAliasRegister("net_frame_freq", "setting frame_freq %+");