From b33f3019e7cb15d5754ddda0520087401143b469 Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 11 Dec 2011 03:14:19 -0500 Subject: [PATCH] Make commands.cfg take advantage of the new ${* ?} features --- commands.cfg | 82 ++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/commands.cfg b/commands.cfg index 019e90efa..df0d83376 100644 --- a/commands.cfg +++ b/commands.cfg @@ -27,29 +27,29 @@ if_client alias who "cmd who" if_dedicated alias who "sv_cmd who" alias w who -alias g_hitplots_add "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 union def" -alias g_hitplots_remove "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 difference def" +alias g_hitplots_add "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} union def" +alias g_hitplots_remove "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} difference def" -alias g_maplist_add "qc_cmd maplist add $*" -alias g_maplist_remove "qc_cmd maplist remove $*" -alias g_maplist_putfirst "qc_cmd maplist remove $* ; qc_cmd maplist add $*" +alias g_maplist_add "qc_cmd maplist add ${* ?}" +alias g_maplist_remove "qc_cmd maplist remove ${* ?}" +alias g_maplist_putfirst "qc_cmd maplist remove ${* ?} ; qc_cmd maplist add ${* ?}" alias g_maplist_shufflenow "qc_cmd maplist shuffle" alias g_maplist_cleanup "qc_cmd maplist cleanup" // removes maps that don't exist from the map list -alias addfav "qc_cmd addtolist net_slist_favorites $*" -alias addvote "qc_cmd addtolist sv_vote_commands $*" +alias addfav "qc_cmd addtolist net_slist_favorites ${* ?}" +alias addvote "qc_cmd addtolist sv_vote_commands ${* ?}" // ======================== // engine command aliases // ======================== alias bsp "ls maps/*.bsp" -alias chmap "changelevel $*" -alias rec "record demos/$1" +alias chmap "changelevel ${* ?}" +alias rec "record demos/${1 !}" alias ply "playdemo $1" alias tdem "timedemo $1" alias sv_loadconfig "exec $serverconfig" -alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. $* \"; quit_and_redirect self" +alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. ${* ?} \"; quit_and_redirect self" // =============================================== @@ -57,7 +57,7 @@ alias sv_restart "say \"Server will restart at the end of the match, you will al // =============================================== alias menu_showteamselect "menu_cmd directmenu TeamSelect" alias menu_showhudexit "menu_cmd directmenu HUDExit" -alias menu_showhudoptions "menu_cmd directpanelhudmenu $*" +alias menu_showhudoptions "menu_cmd directpanelhudmenu ${* ?}" alias menu_showsandboxtools "menu_cmd directmenu SandboxTools" // command executed before loading a map by the menu @@ -70,9 +70,9 @@ alias menu_loadmap_prepare "disconnect; wait; g_campaign 0; menu_cmd rpn /_menu_ // cl_cmd (client console command) - client/gamecommand.qc // ========================================================= alias radar "cl_cmd hud_panel_radar_maximized" -alias scoreboard_columns_set "cl_cmd scoreboard_columns_set $*" +alias scoreboard_columns_set "cl_cmd scoreboard_columns_set ${* ?}" alias scoreboard_columns_set "" // aliased later -alias scoreboard_columns_help "cl_cmd scoreboard_columns_help $*" +alias scoreboard_columns_help "cl_cmd scoreboard_columns_help ${* ?}" // =========================================================== @@ -85,7 +85,7 @@ seta sv_status_privacy 1 "hide IP addresses from \"status\" and \"who\" replies seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying" -alias autoswitch "set cl_autoswitch $1 ; cmd autoswitch $1" +alias autoswitch "set cl_autoswitch ${1 ?} ; cmd autoswitch ${1 ?}" alias records "cmd records" alias rankings "cmd rankings" @@ -105,16 +105,16 @@ alias team_pink "cmd selectteam pink; cmd join" alias team_yellow "cmd selectteam yellow; cmd join" alias team_auto "cmd selectteam auto; cmd join" -alias sandbox "cmd g_sandbox $*" +alias sandbox "cmd g_sandbox ${* ?}" alias spec "cmd spectate" -alias suggestmap "cmd suggestmap $1" +alias suggestmap "cmd suggestmap ${1 ?}" // ========================================================= // sv_cmd (server console command) - server/gamecommand.qc // ========================================================= -alias adminmsg "sv_cmd adminmsg $*" +alias adminmsg "sv_cmd adminmsg ${* ?}" alias allready "sv_cmd allready" alias endmatch "timelimit -1" @@ -124,23 +124,23 @@ alias reducematchtime "sv_cmd reducematchtime" alias printstats "sv_cmd printstats" // print stats on demand -alias gametype "sv_cmd gametype $*" +alias gametype "sv_cmd gametype ${* ?}" -alias savedb "sv_cmd database save \"$1\"" -alias dumpdb "sv_cmd database dump \"$1\"" -alias loaddb "sv_cmd database load \"$1\"" +alias savedb "sv_cmd database save \"${1 ?}\"" +alias dumpdb "sv_cmd database dump \"${1 ?}\"" +alias loaddb "sv_cmd database load \"${1 ?}\"" -alias movetoteam_red "sv_cmd movetoteam $1 red" -alias movetoteam_blue "sv_cmd movetoteam $1 blue" -alias movetoteam_pink "sv_cmd movetoteam $1 pink" -alias movetoteam_yellow "sv_cmd movetoteam $1 yellow" -alias movetoteam_auto "sv_cmd movetoteam $1 auto" +alias movetoteam_red "sv_cmd movetoteam ${1 ?} red" +alias movetoteam_blue "sv_cmd movetoteam ${1 ?} blue" +alias movetoteam_pink "sv_cmd movetoteam ${1 ?} pink" +alias movetoteam_yellow "sv_cmd movetoteam ${1 ?} yellow" +alias movetoteam_auto "sv_cmd movetoteam ${1 ?} auto" alias lockteams "sv_cmd lockteams" alias unlockteams "sv_cmd unlockteams" alias nospectators "sv_cmd nospectators" -alias gotomap "sv_cmd gotomap \"$1\"" -alias warp "sv_cmd warp $*" +alias gotomap "sv_cmd gotomap \"${1 ?}\"" +alias warp "sv_cmd warp ${* ?}" // ======================================================= @@ -161,9 +161,9 @@ alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}" // banning - server/ipban.qc // =========================== alias bans "sv_cmd bans" -alias ban "sv_cmd ban $*" // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds) -alias kickban "sv_cmd kickban $*" // usage: kickban # playerno bantime(seconds) masksize(bytes) -alias unban "sv_cmd unban $*" // usage: unban 3 (number from bans) +alias ban "sv_cmd ban ${* ?}" // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds) +alias kickban "sv_cmd kickban ${* ?}" // usage: kickban # playerno bantime(seconds) masksize(bytes) +alias unban "sv_cmd unban ${* ?}" // usage: unban 3 (number from bans) // ========================= @@ -189,24 +189,24 @@ set sv_vote_override_mostrecent 0 alias vhelp "cmd vote help" alias vstatus "cmd vote status" -alias vcall "cmd vote call $*" +alias vcall "cmd vote call ${* ?}" alias vstop "cmd vote stop" alias vmaster "cmd vote master" -alias vlogin "cmd vote login $*" -alias vdo "cmd vote do $*" +alias vlogin "cmd vote login ${* ?}" +alias vdo "cmd vote do ${* ?}" alias vyes "cl_cmd vyes" alias vno "cl_cmd vno" alias vdontcare "cmd vote dontcare" alias vabstain "cmd vote abstain" -alias vmap "vcall gotomap $1" -alias vnextmap "vcall nextmap $1" -alias vkick "vcall kick $1" -alias vkickban "vcall kickban $1" +alias vmap "vcall gotomap ${1 ?}" +alias vnextmap "vcall nextmap ${1 ?}" +alias vkick "vcall kick ${1 ?}" +alias vkickban "vcall kickban ${1 ?}" alias vend "vcall endmatch" -alias vdomap "vdo gotomap $1" -alias vdokick "vdo kick $*" -alias vdokickban "vdo kickban $*" +alias vdomap "vdo gotomap ${1 ?}" +alias vdokick "vdo kick ${* ?}" +alias vdokickban "vdo kickban ${* ?}" alias vdoend "vdo endmatch" // ====================== -- 2.39.2