From af7d6f6fa860d69c6b66f5ad8338499780ab1e81 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 12 Dec 2022 08:18:00 +0300 Subject: [PATCH] engine: common: no point to allow if and else commands in unprivileged mode since scripting is available only for privileged --- engine/common/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/common/cmd.c b/engine/common/cmd.c index 02775d63..2a7c1a8c 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -1395,8 +1395,8 @@ void Cmd_Init( void ) #endif // XASH_DEDICATED Cmd_AddRestrictedCommand( "alias", Cmd_Alias_f, "create a script function. Without arguments show the list of all alias" ); Cmd_AddRestrictedCommand( "unalias", Cmd_UnAlias_f, "remove a script function" ); - Cmd_AddCommand( "if", Cmd_If_f, "compare and set condition bits" ); - Cmd_AddCommand( "else", Cmd_Else_f, "invert condition bit" ); + Cmd_AddRestrictedCommand( "if", Cmd_If_f, "compare and set condition bits" ); + Cmd_AddRestrictedCommand( "else", Cmd_Else_f, "invert condition bit" ); #if defined(XASH_HASHED_VARS) Cmd_AddCommand( "basecmd_stats", BaseCmd_Stats_f, "print info about basecmd usage" );