+ print_to(caller, "^1Vote calling is not allowed before the match has started.");
+ }
+ else if (vote_called)
+ {
+ print_to(caller, "^1There is already a vote called.");
+ }
+ else if (!spectators_allowed && (caller && !IS_PLAYER(caller)))
+ {
+ print_to(caller, "^1Only players can call a vote.");
+ }
+ else if (caller && !IS_CLIENT(caller))
+ {
+ print_to(caller, "^1Only connected clients can vote.");
+ }
+ else if (timeout_status)
+ {
+ print_to(caller, "^1You can not call a vote while a timeout is active.");
+ }
+ else if (caller && (time < caller.vote_waittime))
+ {
+ print_to(caller, strcat("^1You have to wait ^2", ftos(ceil(caller.vote_waittime - time)), "^1 seconds before you can again call a vote."));
+ }
+ else if (!VoteCommand_checknasty(vote_command))
+ {
+ print_to(caller, "^1Syntax error in command, see 'vhelp' for more info.");
+ }
+ else if (!VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc))
+ {
+ print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info.");
+ }
+
+ else // everything went okay, continue with calling the vote
+ {
+ vote_caller = caller; // remember who called the vote