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 menu_showhudoptions "menu_cmd directpanelhudmenu $*"
alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
+// command executed before loading a map by the menu
+// makes sure maxplayers is at least minplayers or bot_number + 1
+alias _menu_loadmap_prepare_maxpl "maxplayers $_menu_loadmap_maxplayers"
+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"
+
// =========================================================
// cl_cmd (client console command) - client/gamecommand.qc
seta sv_status_privacy 1 "hide IP addresses from \"status\" and \"who\" replies shown to clients"
+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 records "cmd records"
alias rankings "cmd rankings"
alias ladder "cmd ladder"
alias timeout "cmd timeout" //use this command to call a timeout
alias timein "cmd timein" //use this command to resume the game before timeout is finished
+alias lsmaps "cmd lsmaps" // lists all maps on server (for vmap, suggestmap, vnextmap)
+alias lsnewmaps "cmd lsnewmaps" // lists all maps on server that do not yet have a record set (race/cts)
+
alias team_red "cmd selectteam red; cmd join"
alias team_blue "cmd selectteam blue; cmd join"
alias team_pink "cmd selectteam pink; cmd join"
alias sandbox "cmd g_sandbox $*"
+alias spec "cmd spectate"
+alias suggestmap "cmd suggestmap $1"
+
// =========================================================
// sv_cmd (server console command) - server/gamecommand.qc
alias adminmsg "sv_cmd adminmsg $*"
alias allready "sv_cmd allready"
+alias endmatch "timelimit -1"
+
alias extendmatchtime "sv_cmd extendmatchtime"
alias reducematchtime "sv_cmd reducematchtime"
// =========================
// voting - server/vote.qc
// =========================
+set sv_vote_call 1 "Allow users to call a vote for the commands in sv_vote_commands"
+set sv_vote_change 1 "Allow voters to change their mind after already voting"
set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
set sv_vote_only_commands ""
set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" "maybe add kickban here (but then sv_vote_master 0)"
-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"
-set sv_vote_call 1 "users can call a vote for the above commands"
-set sv_vote_master 1 "users can call a vote to become master"
-set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
-set sv_vote_change 1 "set to 1 to allow to change you vote/mind"
+set sv_vote_master 1 "Allows the use of the vote master system"
+set sv_vote_master_callable 1 "When set, users can use \"vmaster\" to call a vote to become master of voting commands"
+set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
set sv_vote_singlecount 0 "set to 1 to count votes once after timeout or to 0 to count with every vote"
set sv_vote_timeout 30 "a vote will timeout after this many seconds"
set sv_vote_wait 120 "a player can not call a vote again for this many seconds when his vote was not accepted"
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)"
// when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
set sv_vote_override_mostrecent 0
+
alias vhelp "cmd vote help"
alias vstatus "cmd vote status"
alias vcall "cmd vote call $*"
alias vdokick "vdo kick $*"
alias vdokickban "vdo kickban $*"
alias vdoend "vdo endmatch"
+
+// ======================
+// rcon server commands
+// ======================
+rcon_secure 1
+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"
cl_movement_track_canjump 0
cl_stairsmoothspeed 200
-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"
-
set bot_config_file bots.txt "Name and path of the bot configuration file"
set bot_number 0 "Minimum number of bots"
seta bot_usemodelnames 0 "Use player model names for bot names"
// startmap_dm is used when running with the -listen or -dedicated commandline options
set serverconfig server.cfg
alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1; map _init/_init"
-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"
// aliases:
alias +fire +attack
bind kp_plus "+userbind 17"
bind kp_minus "+userbind 18"
-alias lsmaps "cmd lsmaps" // lists all maps on server (for vmap, suggestmap, vnextmap)
-alias lsnewmaps "cmd lsnewmaps" // lists all maps on server that do not yet have a record set (race/cts)
bind F1 vyes
bind F2 vno
//used for spectate/observer mode
-alias spec "cmd spectate"
bind F3 spec
// NIX (No Items Xonotic) - at each time, everyone uses the same weapon,
seta g_maplist_votable_nodetail 1 "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
seta g_maplist_votable_abstain 0 "when 1, you can abstain from your vote"
seta g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
-alias suggestmap "cmd suggestmap $1"
set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
set g_chat_flood_lmax 2 "normal chat: maximum number of lines per chat message at once"
seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
-// command executed before loading a map by the menu
-// makes sure maxplayers is at least minplayers or bot_number + 1
-alias _menu_loadmap_prepare_maxpl "maxplayers $_menu_loadmap_maxplayers"
-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"
-
// useful vote aliases
set timelimit_increment 5
set timelimit_decrement 5
set timelimit_min 5
set timelimit_max 60
-alias endmatch "timelimit -1"
// useful keybind to maximize the chat area temporarily
// HUD code takes care of many of these now...
alias mute "prvm_edictset server $1 muted 1" // I am lazy and not making an actual command of this
alias unmute "prvm_edictset server $1 muted 0" // dito
-rcon_secure 1
-
set menu_updatecheck 1
set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
return;
}
-// Count the players who are ready and determine whether or not to restart the match
+// Count the players who are ready and determine whether or not to restart the match // todo: add percentage ready support
void ReadyCount()
{
entity tmp_player;
|| (strstrofs(vote_command, "\n", 0) >= 0)
|| (strstrofs(vote_command, "\r", 0) >= 0)
|| (strstrofs(vote_command, "$", 0) >= 0))
- return TRUE;
+ return FALSE;
- return FALSE;
+ return TRUE;
}
float VoteCommand_checkinlist(string vote_command, string list)
{
case VC_REQUEST_COMMAND:
{
- float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage));
+ float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
+ || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage)
+ || (autocvar_sv_vote_nospectators == 0));
+
float tmp_playercount;
entity tmp_player;
if not(autocvar_sv_vote_call || !caller) { print_to(caller, "^1Vote calling is not allowed."); }
else if(votecalled) { print_to(caller, "^1There is already a vote called."); }
- else if(spectators_allowed && (caller && (caller.classname != "player"))) { print_to(caller, "^1Only players can call a vote."); }
+ else if(!spectators_allowed && (caller && (caller.classname != "player"))) { print_to(caller, "^1Only players can call a vote."); }
else if(timeoutStatus) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
else if(caller && (time < caller.vote_next)) { print_to(caller, strcat("^1You have to wait ^2", ftos(ceil(caller.vote_next - time)), "^1 seconds before you can again call a vote.")); }
else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
default: // calling a vote for master
{
- if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); } // todo update this description in defaultXonotic.cfg
+ if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
else if(votecalled) { print_to(caller, "^1There is already a vote called."); }
else // everything went okay, continue with creating vote