[nexuiz-commits] r6558 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Apr 22 07:04:12 EDT 2009


Author: div0
Date: 2009-04-22 07:04:06 -0400 (Wed, 22 Apr 2009)
New Revision: 6558

Modified:
   trunk/data/qcsrc/server/ipban.qc
Log:
more ipban message fixes


Modified: trunk/data/qcsrc/server/ipban.qc
===================================================================
--- trunk/data/qcsrc/server/ipban.qc	2009-04-22 10:56:05 UTC (rev 6557)
+++ trunk/data/qcsrc/server/ipban.qc	2009-04-22 11:04:06 UTC (rev 6558)
@@ -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