From: terencehill Date: Thu, 13 Jan 2022 17:48:31 +0000 (+0100) Subject: Clean up code parsing restart / resetmatch commands (avoids repetitions) X-Git-Tag: xonotic-v0.8.5~237 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc9868598acd312da2462bdc54b8d026a385179e;p=xonotic%2Fxonotic-data.pk3dir.git Clean up code parsing restart / resetmatch commands (avoids repetitions) --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 6b39ab7b6..d1be9e9b2 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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; }