]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qc
Link control points as well
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index 1fa1be119a44c5a9250e0baf35ab7000657dd67d..35d441fece3166e3983aeb8a963b727ac6c8e4d7 100644 (file)
@@ -43,7 +43,7 @@ float Nagger_SendEntity(entity to, float sendflags)
                nags |= 128;
 
        if(!(nags & 4)) // no vote called? send no string
-               nags &~= (64 | 128);
+               nags &= ~(64 | 128);
 
        WriteByte(MSG_ENTITY, nags);
 
@@ -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;