]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix deferred vote calls
authorz411 <z411@omaera.org>
Mon, 19 Apr 2021 04:38:33 +0000 (00:38 -0400)
committerz411 <z411@omaera.org>
Mon, 19 Apr 2021 04:38:33 +0000 (00:38 -0400)
qcsrc/server/command/vote.qc

index 3c01e87c7e05d53a003f3b3216b1da98f29b1ee7..032f871df84a94efc1773f77ef2b72513b50f18b 100644 (file)
@@ -726,7 +726,7 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                                if (first_command == "kickban")
                                        command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~");
 
-                               vote_parsed_command = strcat("defer 2 ", first_command, " # ", ftos(etof(victim)), " ", command_arguments);
+                               vote_parsed_command = strcat("defer 2 \"", first_command, " # ", ftos(etof(victim)), " ", command_arguments, "\"");
                                vote_parsed_display = sprintf("^1%s #%d ^7%s^1 %s", first_command, etof(victim), victim.netname, reason);
                        }
                        else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return 0; }
@@ -740,8 +740,8 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                {
                        vote_command = ValidateMap(argv(startpos + 1), caller);
                        if (!vote_command)  return -1;
-                       vote_parsed_command = strcat("defer 2 gotomap ", vote_command);
-                       vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
+                       vote_parsed_command = strcat("defer 2 \"gotomap ", vote_command, "\"");
+                       vote_parsed_display = strzone(strcat("^1gotomap ", vote_command));
 
                        break;
                }