Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/ntserv



Date:	Monday May 31, 1999 @ 5:58
Author:	unbelver

Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv4156

Modified Files:
	gencmds.c 
Log Message:
EJECT voting bug. (you can only vote EJECT every 2.0 minutes)

Original line checked interval incorrectly.  It erroneously checked to
see if the current time plus the voting interval was greater than when
the vote was originally lodged. That always is true.  

New line checks to see if the current time is less than the original
vote time plus the voting frequency to determine if it is too soon to
vote.

Its 4am.  I'm going to bed.  Yay! This bug has always annoyed me.

--Carlos V.




****************************************

Index: Vanilla/ntserv/gencmds.c
diff -u Vanilla/ntserv/gencmds.c:1.4 Vanilla/ntserv/gencmds.c:1.5
--- Vanilla/ntserv/gencmds.c:1.4	Fri Apr 30 18:31:30 1999
+++ Vanilla/ntserv/gencmds.c	Mon May 31 05:58:43 1999
@@ -226,7 +226,7 @@
   j = &players[who];
   if ((j->voting[what] != 0) && (votes[num].frequency != 0))
   {
-    if (j->voting[what] < time(NULL) + votes[num].frequency)
+    if ( (j->voting[what] + votes[num].frequency) > time(NULL) )
     {
       bounce(who,"Sorry, you can only use %s every %1.1f minutes",
 	     votes[num].command, votes[num].frequency / 60.0);