if(to.vote_selection == 0)
nags |= 8;
}
- if(inWarmupStage)
+ if(warmup_stage)
nags |= 16;
if(sendflags & 64)
nags |= 128;
if(!(nags & 4)) // no vote called? send no string
- nags &~= (64 | 128);
+ nags &= ~(64 | 128);
WriteByte(MSG_ENTITY, nags);
vote_accept_count = vote_reject_count = vote_abstain_count = 0;
float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
- || ((autocvar_sv_vote_nospectators == 1) && (inWarmupStage || gameover))
+ || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
|| (autocvar_sv_vote_nospectators == 0));
float vote_player_count = 0, notvoters = 0;
restart_mapalreadyrestarted = 0; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
// disable the warmup global for the server
- inWarmupStage = 0; // once the game is restarted the game is in match stage
+ warmup_stage = 0; // once the game is restarted the game is in match stage
// reset the .ready status of all players (also spectators)
FOR_EACH_REALCLIENT(tmp_player) { tmp_player.ready = 0; }
first_command = argv(startpos);
+ /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
+ substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)),
+ strlen(substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)))
+ ));*/
+
+ if(
+ (autocvar_sv_vote_limit > 0)
+ &&
+ (strlen(substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos))) > autocvar_sv_vote_limit)
+ )
+ return FALSE;
+
if not(VoteCommand_checkinlist(first_command, vote_list))
return FALSE;
case CMD_REQUEST_COMMAND:
{
float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
- || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage)
+ || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
|| (autocvar_sv_vote_nospectators == 0));
float tmp_playercount = 0;
default: // calling a vote for master
{
float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
- || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage)
+ || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
|| (autocvar_sv_vote_nospectators == 0));
if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
void VoteCommand_macro_help(entity caller, float argc)
{
string command_origin = GetCommandPrefix(caller);
-
- if(argc == 2) // help display listing all commands
+
+ if(argc == 2 || argv(2) == "help") // help display listing all commands
{
print_to(caller, "\nVoting commands:\n");
#define VOTE_COMMAND(name,function,description,assignment) \