]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up code parsing restart / resetmatch commands (avoids repetitions)
authorterencehill <piuntn@gmail.com>
Thu, 13 Jan 2022 17:48:31 +0000 (18:48 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 13 Jan 2022 17:48:31 +0000 (18:48 +0100)
qcsrc/server/command/vote.qc

index 6b39ab7b6d90ffd4d4e8ea90a0dc5962d531af33..d1be9e9b2e055a17456fa9a9e7f2e771d07fb62b 100644 (file)
@@ -760,11 +760,12 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                        break;
                }
 
-               case "restart":
-               case "resetmatch":  // re-direct all match restarting to resetmatch
+               case "restart": // re-direct all match restarting to resetmatch
+                       vote_command = "resetmatch"; // fall-through
+               case "resetmatch":
                {
-                       vote_parsed_command = "resetmatch";
-                       vote_parsed_display = strzone("^1resetmatch");
+                       vote_parsed_command = vote_command;
+                       vote_parsed_display = strzone(strcat("^1", vote_command));
 
                        break;
                }