]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - commands.cfg
Merge remote branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / commands.cfg
1 // =================================================================
2 //  Master config for managing various command aliases and settings
3 // =================================================================
4
5 // This alias allows for common commands to be executed, even on both
6 // dedicated servers and normal clients. If dedicated, then it remains
7 // as sv_cmd... If a normal client, then it is changed to menu_cmd.
8 alias qc_cmd "sv_cmd $*" 
9
10 // Execute commands based on whether it is dedicated a server or a client.
11 alias "_detect_dedicated_$qport" "${* asis}"
12 alias "_detect_dedicated_0" ""
13 alias _if_dedicated "_detect_dedicated_$qport ${* asis}"
14 alias if_client "${* asis}"
15 alias if_dedicated "${* asis}"
16 _if_dedicated alias if_client ""
17 if_client alias if_dedicated ""
18
19
20 // ========
21 //  common
22 // ========
23 if_client alias teamstatus "cmd teamstatus"
24 if_dedicated alias teamstatus "sv_cmd teamstatus"
25
26 if_client alias who "cmd who"
27 if_dedicated alias who "sv_cmd who"
28 alias w who
29
30 alias g_hitplots_add "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 union def"
31 alias g_hitplots_remove "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 difference def"
32
33 alias g_maplist_add     "qc_cmd maplist add $*"
34 alias g_maplist_remove  "qc_cmd maplist remove $*"
35 alias g_maplist_putfirst        "qc_cmd maplist remove $* ; qc_cmd maplist add $*"
36 alias g_maplist_shufflenow      "qc_cmd maplist shuffle"
37 alias g_maplist_cleanup "qc_cmd maplist cleanup" // removes maps that don't exist from the map list
38
39 alias addfav "qc_cmd addtolist net_slist_favorites $*"
40 alias addvote "qc_cmd addtolist sv_vote_commands $*"
41
42
43 // ========================
44 //  engine command aliases
45 // ========================
46 alias bsp "ls maps/*.bsp"
47 alias chmap "changelevel $*"
48 alias rec "record demos/$1"
49 alias ply "playdemo $1"
50 alias tdem "timedemo $1"
51
52
53 // ===============================================
54 //  menu_cmd (menu command) - menu/gamecommand.qc
55 // ===============================================
56 alias menu_showteamselect "menu_cmd directmenu TeamSelect"
57 alias menu_showhudexit "menu_cmd directmenu HUDExit"
58 alias menu_showhudoptions "menu_cmd directpanelhudmenu $*"
59 alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
60
61
62 // =========================================================
63 //  cl_cmd (client console command) - client/gamecommand.qc
64 // =========================================================
65 alias radar "cl_cmd hud_panel_radar_maximized"
66 alias scoreboard_columns_set  "cl_cmd scoreboard_columns_set $*"
67 alias scoreboard_columns_set  "" // aliased later
68 alias scoreboard_columns_help "cl_cmd scoreboard_columns_help $*"
69
70
71 // ===========================================================
72 //  cmd (client-to-server command) - server/clientcommands.qc
73 // ===========================================================
74 set sv_clientcommand_antispam_time 1 "Amount of seconds after a command before another command can be called again without being considered spam. (Use -1 for no antispam limit)"
75 set sv_clientcommand_antispam_count 5 "Amount of commands considered spam before commands are rejected.
76
77 seta sv_status_privacy 1 "hide IP addresses from \"status\" and \"who\" replies shown to clients"
78
79 alias records "cmd records"
80 alias rankings "cmd rankings"
81 alias ladder "cmd ladder"
82
83 alias ready "cmd ready"
84 alias cointoss "sv_cmd cointoss"
85 alias timeout "cmd timeout" //use this command to call a timeout
86 alias timein "cmd timein" //use this command to resume the game before timeout is finished
87
88 alias team_red "cmd selectteam red; cmd join"
89 alias team_blue "cmd selectteam blue; cmd join"
90 alias team_pink "cmd selectteam pink; cmd join"
91 alias team_yellow "cmd selectteam yellow; cmd join"
92 alias team_auto "cmd selectteam auto; cmd join"
93
94
95 // =========================================================
96 //  sv_cmd (server console command) - server/gamecommand.qc
97 // =========================================================
98 alias adminmsg  "sv_cmd adminmsg $*"
99 alias allready "sv_cmd allready"
100
101 alias extendmatchtime "sv_cmd extendmatchtime"
102 alias reducematchtime "sv_cmd reducematchtime"
103
104 alias printstats        "sv_cmd printstats" // print stats on demand
105
106 alias gametype "sv_cmd gametype $*"
107
108 alias savedb "sv_cmd database save \"$1\""
109 alias dumpdb "sv_cmd database dump \"$1\""
110 alias loaddb "sv_cmd database load \"$1\""
111
112 alias movetoteam_red "sv_cmd movetoteam $1 red"
113 alias movetoteam_blue "sv_cmd movetoteam $1 blue"
114 alias movetoteam_pink "sv_cmd movetoteam $1 pink"
115 alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
116 alias movetoteam_auto "sv_cmd movetoteam $1 auto"
117
118 alias lockteams "sv_cmd lockteams"
119 alias unlockteams "sv_cmd unlockteams"
120 alias nospectators "sv_cmd nospectators"
121 alias gotomap "sv_cmd gotomap \"$1\""
122 alias warp "sv_cmd warp $*"
123
124
125 // =======================================================
126 //  Aliases for settemp subsystem. Warning: Do not touch. 
127 //  Usage: settemp variable value, next map resets it.
128 // =======================================================
129 set settemp_list 0
130 set settemp_idx 0
131 set _settemp_var UNUSED
132 alias settemp "_settemp_var \"_settemp_x$settemp_idx\"; qc_cmd rpn /settemp_idx settemp_idx 1 add def; _settemp \"$1\" \"$2\""
133 alias _settemp "settemp_list \"1 $1 $_settemp_var $settemp_list\"; set $_settemp_var \"${$1}\"; $1 \"$2\""
134 alias settemp_restore "_settemp_restore_${settemp_list asis}"
135 alias _settemp_restore_0 "set settemp_var 0; set settemp_list 0"
136 alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}"
137
138
139 // ===========================
140 //  banning - server/ipban.qc
141 // ===========================
142 alias bans "sv_cmd bans"
143 alias ban "sv_cmd ban $*"         // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds)
144 alias kickban "sv_cmd kickban $*" // usage: kickban # playerno bantime(seconds) masksize(bytes)
145 alias unban "sv_cmd unban $*"     // usage: unban 3 (number from bans)
146
147
148 // =========================
149 //  voting - server/vote.qc
150 // =========================
151 set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
152 set sv_vote_only_commands ""
153 set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"  "maybe add kickban here (but then sv_vote_master 0)"
154 set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"
155 set sv_vote_call 1      "users can call a vote for the above commands"
156 set sv_vote_master 1    "users can call a vote to become master"
157 set sv_vote_master_password ""  "when set, users can use \"vlogin PASSWORD\" to log in as master"
158 set sv_vote_change 1    "set to 1 to allow to change you vote/mind"
159 set sv_vote_singlecount 0       "set to 1 to count votes once after timeout or to 0 to count with every vote"
160 set sv_vote_timeout 30  "a vote will timeout after this many seconds"
161 set sv_vote_wait 120    "a player can not call a vote again for this many seconds when his vote was not accepted"
162 set sv_vote_stop 15     "a player can not call a vote again for this many seconds when he stopped this vote (e.g. to correct it)"
163 set sv_vote_majority_factor 0.5 "which quotient of the PLAYERS constitute a majority? (try: 0.666, 0.75 when using the above)"
164 set sv_vote_simple_majority_factor 0.666        "which quotient of the VOTERS constitute a majority too? (0 = off, otherwise it must be higher than or equal to sv_vote_majority_factor)"
165 // when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
166 set sv_vote_override_mostrecent 0
167 alias vhelp "cmd vote help"
168 alias vstatus "cmd vote status"
169 alias vcall "cmd vote call $*"
170 alias vstop "cmd vote stop"
171 alias vmaster "cmd vote master"
172 alias vlogin "cmd vote login $*"
173 alias vdo "cmd vote do $*"
174 alias vyes "cl_cmd vyes"
175 alias vno "cl_cmd vno"
176 alias vdontcare "cmd vote dontcare"
177 alias vabstain "cmd vote abstain"
178
179 alias vmap "vcall gotomap $1"
180 alias vnextmap "vcall nextmap $1"
181 alias vkick "vcall kick $1"
182 alias vkickban "vcall kickban $1"
183 alias vend "vcall endmatch"
184 alias vdomap "vdo gotomap $1"
185 alias vdokick "vdo kick $*"
186 alias vdokickban "vdo kickban $*"
187 alias vdoend "vdo endmatch"