From d4bb72881c9fa394756bcf471b6101dea92573e6 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 14 Apr 2016 16:54:10 +1000 Subject: [PATCH] Instead of causing an error, print a message about the missiong vote restriction cvar --- qcsrc/server/command/vote.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 4bd8dee6e..2b1e4e75d 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -570,10 +570,15 @@ float VoteCommand_checkargs(float startpos, float argc) { float p, q, check, minargs; string cvarname = strcat("sv_vote_command_restriction_", argv(startpos)); - string cmdrestriction = cvar_string(cvarname); // note: this warns on undefined cvar. We want that. + string cmdrestriction = ""; // No we don't. string charlist, arg; float checkmate; + if(cvar_type(cvarname) & CVAR_TYPEFLAG_EXISTS) + cmdrestriction = cvar_string(cvarname); + else + LOG_INFO("NOTE: ", cvarname, " does not exist, no restrictions will be applied.\n"); + if (cmdrestriction == "") return true; ++startpos; // skip command name -- 2.39.2