]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - commands.cfg
Can't forget this :P
[xonotic/xonotic-data.pk3dir.git] / commands.cfg
1 // =================================================================
2 //  Master config for managing various command aliases and settings
3 // =================================================================
4
5 // Execute commands based on whether it is dedicated a server or a client.
6 alias "_detect_dedicated_$qport" "${* asis}"
7 alias "_detect_dedicated_0" ""
8 alias _if_dedicated "_detect_dedicated_$qport ${* asis}"
9 alias if_client "${* asis}"
10 alias if_dedicated "${* asis}"
11 _if_dedicated alias if_client ""
12 if_client alias if_dedicated ""
13
14 if_client set cmd_prefix "cmd"
15 if_dedicated set cmd_prefix "sv_cmd"
16
17 if_dedicated "alias" qc_cmd_svmenu "sv_cmd $$*"
18 if_client    "alias" qc_cmd_svmenu "menu_cmd $$*"
19 if_dedicated "alias" qc_cmd_svcl   "sv_cmd $$*"
20 if_client    "alias" qc_cmd_svcl   "cl_cmd $$*"
21 if_dedicated "alias" qc_cmd_svcmd  "sv_cmd $$*"
22 if_client    "alias" qc_cmd_svcmd  "cmd $$*"
23
24
25 // ========
26 //  common
27 // ========
28 alias cvar_changes "qc_cmd_svcmd cvar_changes"
29 alias cvar_purechanges "qc_cmd_svcmd cvar_purechanges"
30 alias info "qc_cmd_svcmd info ${* ?}"
31 alias ladder "qc_cmd_svcmd ladder"
32 alias lsmaps "qc_cmd_svcmd lsmaps"
33 alias lsnewmaps "qc_cmd_svcmd lsnewmaps"
34 alias maplist "qc_cmd_svcmd maplist"
35 alias rankings "qc_cmd_svcmd rankings"
36 alias records "qc_cmd_svcmd records"
37 alias teamstatus "qc_cmd_svcmd teamstatus"
38 alias time "qc_cmd_svcmd time"
39 alias timein "qc_cmd_svcmd timein"
40 alias timeout "qc_cmd_svcmd timeout"
41 alias vote "qc_cmd_svcmd vote ${* ?}"
42 alias who "qc_cmd_svcmd who ${* ?}"
43
44 alias g_hitplots_add "qc_cmd_svmenu rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} union def"
45 alias g_hitplots_remove "qc_cmd_svmenu rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} difference def"
46
47 alias g_maplist_add     "qc_cmd_svmenu maplist add ${* ?}"
48 alias g_maplist_remove  "qc_cmd_svmenu maplist remove ${* ?}"
49 alias g_maplist_putfirst        "qc_cmd_svmenu maplist remove ${* ?} ; qc_cmd maplist add ${* ?}"
50 alias g_maplist_shufflenow      "qc_cmd_svmenu maplist shuffle"
51 alias g_maplist_cleanup "qc_cmd_svmenu maplist cleanup" // removes maps that don't exist from the map list
52
53 alias addfav "qc_cmd_svmenu addtolist net_slist_favorites ${* ?}"
54 alias addvote "qc_cmd_svmenu addtolist sv_vote_commands ${* ?}"
55
56
57 // ========================
58 //  engine command aliases
59 // ========================
60 alias bsp "ls maps/*.bsp"
61 alias chmap "changelevel ${* ?}"
62 alias clearmap "disconnect"
63 alias ply "playdemo $1"
64 alias rec "record demos/${1 !}"
65 alias sv_loadconfig "exec $serverconfig"
66 alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. ${* ?} \"; quit_and_redirect self"
67 alias tdem "timedemo $1"
68
69
70 // ===============================================
71 //  menu_cmd (menu command) - menu/command/menu_cmd.qc
72 // ===============================================
73 alias menu_showteamselect "menu_cmd directmenu TeamSelect"
74 alias menu_showhudexit "menu_cmd directmenu HUDExit"
75 alias menu_showhudoptions "menu_cmd directpanelhudmenu ${* ?}"
76 alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
77 alias menu_showquitdialog "menu_cmd directmenu Quit"
78
79 // command executed before loading a map by the menu
80 // makes sure maxplayers is at least minplayers or bot_number + 1
81 alias _menu_loadmap_prepare_maxpl "maxplayers $_menu_loadmap_maxplayers"
82 alias menu_loadmap_prepare "disconnect; wait; g_campaign 0; menu_cmd rpn /_menu_loadmap_maxplayers menu_maxplayers minplayers bot_number 1 add max max def; _menu_loadmap_prepare_maxpl; g_maplist_shufflenow"
83
84
85 // ==========================================================
86 //  cl_cmd (client local command) - client/command/cl_cmd.qc
87 // ==========================================================
88 // commented out commands are really only intended for internal use
89 if_client alias blurtest "cl_cmd blurtest"
90 if_client alias debugmodel "cl_cmd debugmodel ${* ?}"
91 //if_client alias handlevote "cl_cmd handlevote ${* ?}"
92 if_client alias hud "cl_cmd hud ${* ?}"
93 if_client alias localprint "cl_cmd localprint ${* ?}"
94 //if_client alias mv_download "cl_cmd mv_download ${* ?}"
95 if_client alias sendcvar "cl_cmd sendcvar ${* ?}"
96 //if_client alias settemp "cl_cmd settemp ${* ?}"
97 //if_client alias settemp_restore "cl_cmd settemp_restore"
98
99 // other aliases for local commands
100 if_client alias hud_configure "cl_cmd hud configure"
101 if_client alias hud_save "cl_cmd hud save ${* ?}"
102 if_client alias radar "cl_cmd hud radar ${* ?}"
103 if_client alias scoreboard_columns_help "cl_cmd hud scoreboard_columns_help"
104 if_client alias scoreboard_columns_set "cl_cmd hud scoreboard_columns_set ${* ?}"
105
106 // changes a cvar and reports it to the server (for the client to notify the server about changes)
107 alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
108
109
110 // ========================================================
111 //  cmd (client-to-server command) - server/command/cmd.qc
112 // ========================================================
113 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)"
114 set sv_clientcommand_antispam_count 8 "Amount of commands considered spam before commands are rejected."
115 seta sv_status_privacy 1 "hide IP addresses from \"status\" and \"who\" replies shown to clients"
116 seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying"
117
118 // commented out commands are really only intended for internal use, or already have declaration in the engine
119 alias autoswitch "cmd autoswitch ${* ?}"
120 alias checkfail "cmd checkfail ${* ?}"
121 alias clientversion "cmd clientversion ${* ?}"
122 //alias getmapvotepic "cmd getmapvotepic ${* ?}"
123 alias join "cmd join"
124 alias ready "cmd ready"
125 alias records "cmd records"
126 alias reportcvar "cmd reportcvar ${* ?}"
127 //alias say "cmd say ${* ?}" // engine already has this declared as a command
128 //alias say_team "cmd say_team ${* ?}" // engine already has this declared as a command
129 alias selectteam "cmd selectteam ${* ?}"
130 alias sentcvar "cmd sentcvar ${* ?}"
131 alias spectate "cmd spectate"
132 alias suggestmap "cmd suggestmap ${* ?}"
133 //alias tell "cmd tell ${* ?}" // engine already has this declared as a command
134 alias voice "cmd voice ${* ?}"
135
136 // other aliases for client-to-server commands
137 alias autoswitch "set cl_autoswitch ${1 ?} ; cmd autoswitch ${1 ?}" // todo
138
139 alias team_red "cmd selectteam red; cmd join"
140 alias team_blue "cmd selectteam blue; cmd join"
141 alias team_pink "cmd selectteam pink; cmd join"
142 alias team_yellow "cmd selectteam yellow; cmd join"
143 alias team_auto "cmd selectteam auto; cmd join"
144
145 alias spec "spectate"
146
147 // mutator aliases
148 alias sandbox "cmd g_sandbox ${* ?}"
149
150
151 // ============================================================
152 //  sv_cmd (server console command) - server/command/sv_cmd.qc
153 // ============================================================
154 alias adminmsg "sv_cmd adminmsg ${* ?}"
155 alias allready "sv_cmd allready"
156 alias allspec "sv_cmd allspec ${* ?}"
157 alias anticheat "sv_cmd anticheat ${* ?}"
158 alias bbox "sv_cmd bbox"
159 alias bot_cmd "sv_cmd bot_cmd ${* ?}"
160 alias cointoss "sv_cmd cointoss ${* ?}"
161 alias database "sv_cmd database ${* ?}"
162 alias defer_clear "sv_cmd defer_clear ${* ?}"
163 alias defer_clear_all "sv_cmd defer_clear_all"
164 alias delrec "sv_cmd delrec ${* ?}"
165 alias effectindexdump "sv_cmd effectindexdump"
166 alias extendmatchtime "sv_cmd extendmatchtime"
167 alias find "sv_cmd find ${* ?}"
168 alias gametype "sv_cmd gametype ${* ?}"
169 alias gettaginfo "sv_cmd gettaginfo ${* ?}"
170 alias gotomap "sv_cmd gotomap ${* ?}"
171 alias lockteams "sv_cmd lockteams"
172 alias make_mapinfo "sv_cmd make_mapinfo"
173 alias modelbug "sv_cmd modelbug"
174 alias moveplayer "sv_cmd moveplayer ${* ?}"
175 alias nospectators "sv_cmd nospectators"
176 alias onslaught_updatelinks "sv_cmd onslaught_updatelinks"
177 alias playerdemo "sv_cmd playerdemo ${* ?}"
178 alias printstats "sv_cmd printstats"
179 alias radarmap "sv_cmd radarmap ${* ?}"
180 alias reducematchtime "sv_cmd reducematchtime"
181 alias setbots "sv_cmd setbots ${* ?}"
182 alias shuffleteams "sv_cmd shuffleteams"
183 alias stuffto "sv_cmd stuffto ${* ?}"
184 alias trace "sv_cmd trace ${* ?}"
185 alias unlockteams "sv_cmd unlockteams"
186 alias warp "sv_cmd warp ${* ?}"
187
188 // other aliases for server commands
189 alias endmatch "timelimit -1"
190
191 alias savedb "sv_cmd database save \"${1 ?}\""
192 alias dumpdb "sv_cmd database dump \"${1 ?}\""
193 alias loaddb "sv_cmd database load \"${1 ?}\""
194
195 alias movetored "moveplayer ${1 ?} red"
196 alias movetoblue "moveplayer ${1 ?} blue"
197 alias movetopink "moveplayer ${1 ?} pink"
198 alias movetoyellow "moveplayer ${1 ?} yellow"
199 alias movetoauto "moveplayer ${1 ?} auto"
200
201
202 // =======================================================
203 //  Aliases for settemp subsystem. Warning: Do not touch. 
204 //  Usage: settemp variable value, next map resets it.
205 // =======================================================
206 alias settemp "qc_cmd_svcl settemp $$*"
207 alias settemp_restore "qc_cmd_svcl settemp_restore"
208
209
210 // ===================================
211 //  banning - server/command/ipban.qc
212 // ===================================
213 alias bans "sv_cmd bans"
214 alias ban "sv_cmd ban ${* ?}"         // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds)
215 alias kickban "sv_cmd kickban ${* ?}" // usage: kickban # playerno bantime(seconds) masksize(bytes)
216 alias unban "sv_cmd unban ${* ?}"     // usage: unban 3 (number from bans)
217
218
219 // =================================
220 //  voting - server/command/vote.qc
221 // =================================
222 set sv_vote_call 1 "Allow users to call a vote for the commands in sv_vote_commands"
223 set sv_vote_change 1 "Allow voters to change their mind after already voting"
224 set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto" "these commands can be voted"
225 set sv_vote_only_commands ""
226 set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink" "Commands which vote masters can execute by themselves" // maybe add kickban here (but then sv_vote_master 0)
227 set sv_vote_master 1    "Allows the use of the vote master system"
228 set sv_vote_master_callable 1 "When set, users can use \"vmaster\" to call a vote to become master of voting commands"
229 set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
230 set sv_vote_master_playerlimit 2 "Minimum number of players needed for a player to be allowed to vote for master"
231 set sv_vote_no_stops_vote 1 "Allow the vote caller to stop his own vote simply by voting no"
232 set sv_vote_singlecount 0       "set to 1 to count votes once after timeout or to 0 to count with every vote"
233 set sv_vote_timeout 30  "a vote will timeout after this many seconds"
234 set sv_vote_wait 120    "a player can not call a vote again for this many seconds when his vote was not accepted"
235 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)"
236 set sv_vote_majority_factor 0.5 "What percentage of the PLAYERS constitute a majority? (Must be at least 0.5, recommended: 0.5)"
237 set sv_vote_majority_factor_of_voted 0.5 "What percentage of the VOTERS constitute a majority too? (Must be at least 0.5, recommended: 0.5)"
238 // when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
239 set sv_vote_override_mostrecent 0
240
241 alias vhelp "cmd vote help"
242 alias vstatus "cmd vote status"
243 alias vcall "cmd vote call ${* ?}"
244 alias vstop "cmd vote stop"
245 alias vmaster "cmd vote master"
246 alias vlogin "cmd vote login ${* ?}"
247 alias vdo "cmd vote do ${* ?}"
248 alias vyes "cl_cmd handlevote yes"
249 alias vno "cl_cmd handlevote no"
250 alias vdontcare "cmd vote dontcare"
251 alias vabstain "cmd vote abstain"
252
253 alias vmap "vcall gotomap ${1 ?}"
254 alias vnextmap "vcall nextmap ${1 ?}"
255 alias vkick "vcall kick ${1 ?}"
256 alias vkickban "vcall kickban ${1 ?}"
257 alias vend "vcall endmatch"
258 alias vdomap "vdo gotomap ${1 ?}"
259 alias vdokick "vdo kick ${* ?}"
260 alias vdokickban "vdo kickban ${* ?}"
261 alias vdoend "vdo endmatch"
262
263 // ======================
264 //  rcon server commands
265 // ======================
266 rcon_secure 1
267 set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink"
268
269 // =============================
270 //  other miscellaneous aliases
271 // =============================
272 alias autoscreenshot "screenshot screenshots/autoscreenshot/${1 !}-${2 !}.jpg; echo \"^5A screenshot has been taken at request of the server.\""
273