]> 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 alias sandbox "cmd g_sandbox $*"
95
96
97 // =========================================================
98 //  sv_cmd (server console command) - server/gamecommand.qc
99 // =========================================================
100 alias adminmsg  "sv_cmd adminmsg $*"
101 alias allready "sv_cmd allready"
102
103 alias extendmatchtime "sv_cmd extendmatchtime"
104 alias reducematchtime "sv_cmd reducematchtime"
105
106 alias printstats        "sv_cmd printstats" // print stats on demand
107
108 alias gametype "sv_cmd gametype $*"
109
110 alias savedb "sv_cmd database save \"$1\""
111 alias dumpdb "sv_cmd database dump \"$1\""
112 alias loaddb "sv_cmd database load \"$1\""
113
114 alias movetoteam_red "sv_cmd movetoteam $1 red"
115 alias movetoteam_blue "sv_cmd movetoteam $1 blue"
116 alias movetoteam_pink "sv_cmd movetoteam $1 pink"
117 alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
118 alias movetoteam_auto "sv_cmd movetoteam $1 auto"
119
120 alias lockteams "sv_cmd lockteams"
121 alias unlockteams "sv_cmd unlockteams"
122 alias nospectators "sv_cmd nospectators"
123 alias gotomap "sv_cmd gotomap \"$1\""
124 alias warp "sv_cmd warp $*"
125
126
127 // =======================================================
128 //  Aliases for settemp subsystem. Warning: Do not touch. 
129 //  Usage: settemp variable value, next map resets it.
130 // =======================================================
131 set settemp_list 0
132 set settemp_idx 0
133 set _settemp_var UNUSED
134 alias settemp "_settemp_var \"_settemp_x$settemp_idx\"; qc_cmd rpn /settemp_idx settemp_idx 1 add def; _settemp \"$1\" \"$2\""
135 alias _settemp "settemp_list \"1 $1 $_settemp_var $settemp_list\"; set $_settemp_var \"${$1}\"; $1 \"$2\""
136 alias settemp_restore "_settemp_restore_${settemp_list asis}"
137 alias _settemp_restore_0 "set settemp_var 0; set settemp_list 0"
138 alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}"
139
140
141 // ===========================
142 //  banning - server/ipban.qc
143 // ===========================
144 alias bans "sv_cmd bans"
145 alias ban "sv_cmd ban $*"         // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds)
146 alias kickban "sv_cmd kickban $*" // usage: kickban # playerno bantime(seconds) masksize(bytes)
147 alias unban "sv_cmd unban $*"     // usage: unban 3 (number from bans)
148
149
150 // =========================
151 //  voting - server/vote.qc
152 // =========================
153 set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
154 set sv_vote_only_commands ""
155 set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"  "maybe add kickban here (but then sv_vote_master 0)"
156 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"
157 set sv_vote_call 1      "users can call a vote for the above commands"
158 set sv_vote_master 1    "users can call a vote to become master"
159 set sv_vote_master_password ""  "when set, users can use \"vlogin PASSWORD\" to log in as master"
160 set sv_vote_change 1    "set to 1 to allow to change you vote/mind"
161 set sv_vote_singlecount 0       "set to 1 to count votes once after timeout or to 0 to count with every vote"
162 set sv_vote_timeout 30  "a vote will timeout after this many seconds"
163 set sv_vote_wait 120    "a player can not call a vote again for this many seconds when his vote was not accepted"
164 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)"
165 set sv_vote_majority_factor 0.5 "which quotient of the PLAYERS constitute a majority? (try: 0.666, 0.75 when using the above)"
166 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)"
167 // when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
168 set sv_vote_override_mostrecent 0
169 alias vhelp "cmd vote help"
170 alias vstatus "cmd vote status"
171 alias vcall "cmd vote call $*"
172 alias vstop "cmd vote stop"
173 alias vmaster "cmd vote master"
174 alias vlogin "cmd vote login $*"
175 alias vdo "cmd vote do $*"
176 alias vyes "cl_cmd vyes"
177 alias vno "cl_cmd vno"
178 alias vdontcare "cmd vote dontcare"
179 alias vabstain "cmd vote abstain"
180
181 alias vmap "vcall gotomap $1"
182 alias vnextmap "vcall nextmap $1"
183 alias vkick "vcall kick $1"
184 alias vkickban "vcall kickban $1"
185 alias vend "vcall endmatch"
186 alias vdomap "vdo gotomap $1"
187 alias vdokick "vdo kick $*"
188 alias vdokickban "vdo kickban $*"
189 alias vdoend "vdo endmatch"