From dc9868598acd312da2462bdc54b8d026a385179e Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 13 Jan 2022 18:48:31 +0100 Subject: [PATCH] Clean up code parsing restart / resetmatch commands (avoids repetitions) --- qcsrc/server/command/vote.qc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; } -- 2.39.2