From fa85ab116560cd4b8c4ccf2e9c0e6c184a88549d Mon Sep 17 00:00:00 2001 From: div0 Date: Tue, 8 Jan 2008 21:41:41 +0000 Subject: [PATCH] fix minor bug with argumentless gotomap vote git-svn-id: svn://svn.icculus.org/nexuiz/trunk/data@3116 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/server/clientcommands.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index 258d768e1..c45623e04 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -217,6 +217,8 @@ void SV_ParseClientCommand(string s) { sprint(self, strcat("^1You have to wait ^2", ftos(self.vote_next - time), "^1 seconds before you can again call a vote.\n")); } else if(VoteAllowed(strcat1(argv(2)))) { // strcat seems to be necessary // remap chmap to gotomap (forces intermission) + if(vote == "chmap" || vote == "gotomap") // won't work without arguments + return; if(substring(vote, 0, 6) == "chmap ") vote = strcat("gotomap ", substring(vote, 6, strlen(vote) - 6)); if(substring(vote, 0, 8) == "gotomap ") @@ -304,6 +306,8 @@ void SV_ParseClientCommand(string s) { if(dovote == "") { sprint(self, "^1Your command was empty. See help for more info.\n"); } else if(VoteAllowed(strcat1(argv(2)))) { // strcat seems to be necessary + if(dovote == "chmap" || dovote == "gotomap") // won't work without arguments + return; if(substring(dovote, 0, 6) == "chmap ") dovote = strcat("gotomap ", substring(dovote, 6, strlen(dovote) - 6)); if(substring(dovote, 0, 8) == "gotomap ") -- 2.39.2