From 496b1104d9c9addadb675c95d79edd355f9815d5 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 18 Sep 2017 19:30:16 +0200 Subject: [PATCH] Oops, fix build and shorten a few instructions --- qcsrc/server/command/vote.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index a23d8da390..986ca2b6c7 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -673,8 +673,9 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa if(argc > next_token) reason = substring(vote_command, argv_start_index(next_token) - missing_chars, -1); - if (first_command == "kickban") command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~"); - else command_arguments = reason; + string command_arguments = reason; + if (first_command == "kickban") + command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~"); vote_parsed_command = strcat(first_command, " # ", ftos(etof(victim)), " ", command_arguments); vote_parsed_display = strcat("^1", vote_command, " (^7", victim.netname, "^1): ", reason); @@ -808,10 +809,12 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm } FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++tmp_playercount; }); - if (tmp_playercount > 1) Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL); // don't announce a "vote now" sound if player is alone + if (tmp_playercount > 1) + Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL); bprint("\{1}^2* ^3", OriginalCallerName(), "^2 calls a vote for ", vote_called_display, "\n"); - if (autocvar_sv_eventlog) GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); + if (autocvar_sv_eventlog) + GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); Nagger_VoteChanged(); VoteCount(true); // needed if you are the only one } -- 2.39.2