r3116 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jan 8 16:41:42 EST 2008


Author: div0
Date: 2008-01-08 16:41:41 -0500 (Tue, 08 Jan 2008)
New Revision: 3116

Modified:
   trunk/data/qcsrc/server/clientcommands.qc
Log:
fix minor bug with argumentless gotomap vote


Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2008-01-07 17:47:45 UTC (rev 3115)
+++ trunk/data/qcsrc/server/clientcommands.qc	2008-01-08 21:41:41 UTC (rev 3116)
@@ -217,6 +217,8 @@
 						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 @@
 				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 ")




More information about the nexuiz-commits mailing list