X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qc;h=c7010dfb756369a47cd41aff93425d567d69bfc4;hb=refs%2Ftags%2Fxonotic-v0.7.0;hp=1fa1be119a44c5a9250e0baf35ab7000657dd67d;hpb=756a2e093820dc91621b95d955ca48a3462af3cb;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 1fa1be119..c7010dfb7 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -668,6 +668,18 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl 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;