[nexuiz-commits] r6559 - in branches/nexuiz-2.0: . data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Apr 22 07:05:44 EDT 2009


Author: div0
Date: 2009-04-22 07:05:43 -0400 (Wed, 22 Apr 2009)
New Revision: 6559

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
Log:
r6558 | div0 | 2009-04-22 13:04:06 +0200 (Wed, 22 Apr 2009) | 2 lines
more ipban message fixes


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-04-22 11:04:06 UTC (rev 6558)
+++ branches/nexuiz-2.0/.patchsets	2009-04-22 11:05:43 UTC (rev 6559)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6536,6541-6549,6552-6556
+revisions_applied = 1-6536,6541-6549,6552-6558

Modified: branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ipban.qc	2009-04-22 11:04:06 UTC (rev 6558)
+++ branches/nexuiz-2.0/data/qcsrc/server/ipban.qc	2009-04-22 11:05:43 UTC (rev 6559)
@@ -132,7 +132,7 @@
 		return;
 	}
 
-	print("OK, ", ftos(n), " items\n");
+	print("OK, ", ftos(n / 4), " items\n");
 
 	for(i = 0; i < n; i += 4)
 	{
@@ -141,7 +141,7 @@
 		reason = argv(i + 2);
 		serverip = argv(i + 3);
 
-		dprint("received ban list item ", ftos(i), ": ip=", ip);
+		dprint("received ban list item ", ftos(i / n), ": ip=", ip);
 		dprint(" timeleft=", ftos(timeleft), " reason=", reason);
 		dprint(" serverip=", serverip, "\n");
 
@@ -404,8 +404,10 @@
 			if(time + bantime > ban_expire[i])
 			{
 				ban_expire[i] = time + bantime;
-				print(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n");
+				dprint(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n");
 			}
+			else
+				dprint(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now\n");
 
 			// and enforce
 			reason = Ban_Enforce(i, reason);
@@ -447,7 +449,7 @@
 	}
 	// okay, insert our new victim as i
 	Ban_Delete(i);
-	print(ip, " has been banned for ", ftos(bantime), " seconds\n");
+	dprint(ip, " has been banned for ", ftos(bantime), " seconds\n");
 	ban_expire[i] = time + bantime;
 	ban_ip[i] = strzone(ip);
 	ban_count = max(ban_count, i + 1);



More information about the nexuiz-commits mailing list