mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Add -remove option to joinpassword
This commit is contained in:
parent
264454ca70
commit
b5c4866706
1 changed files with 11 additions and 3 deletions
|
@ -3797,12 +3797,20 @@ static void Command_ChangeJoinPassword_f(void)
|
|||
|
||||
if (COM_Argc() != 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("joinpassword <password>: set a password to join the server\n"));
|
||||
CONS_Printf(M_GetText("joinpassword <password>: set a password to join the server\nUse -remove to disable the password.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
D_SetJoinPassword(COM_Argv(1));
|
||||
CONS_Printf(M_GetText("Join password set.\n"));
|
||||
if (strcmp(COM_Argv(1), "-remove") == 0)
|
||||
{
|
||||
joinpasswordset = false;
|
||||
CONS_Printf(M_GetText("Join password removed.\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
D_SetJoinPassword(COM_Argv(1));
|
||||
CONS_Printf(M_GetText("Join password set.\n"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue