r5228 - in branches/nexuiz-2.0: . data data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Dec 15 10:22:16 EST 2008


Author: div0
Date: 2008-12-15 10:22:16 -0500 (Mon, 15 Dec 2008)
New Revision: 5228

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
Log:
r5227 | div0 | 2008-12-15 16:16:01 +0100 (Mon, 15 Dec 2008) | 3 lines
ipban: 
set g_ban_sync_trusted_servers_verify 0 // when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used

Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2008-12-15 15:16:01 UTC (rev 5227)
+++ branches/nexuiz-2.0/.patchsets	2008-12-15 15:22:16 UTC (rev 5228)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-5225
+revisions_applied = 1-5227

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2008-12-15 15:16:01 UTC (rev 5227)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2008-12-15 15:22:16 UTC (rev 5228)
@@ -1232,5 +1232,6 @@
 set g_ban_sync_uri "" // sync using this ban list provider (empty string to disable)
 set g_ban_sync_interval 5 // sync every 5 minutes
 set g_ban_sync_trusted_servers "" // request ban lists from these nexuiz servers (do not include your own server there, or unbanning may fail)
+set g_ban_sync_trusted_servers_verify 0 // when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used
 
 alias records "cmd records"

Modified: branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ipban.qc	2008-12-15 15:16:01 UTC (rev 5227)
+++ branches/nexuiz-2.0/data/qcsrc/server/ipban.qc	2008-12-15 15:22:16 UTC (rev 5228)
@@ -120,16 +120,17 @@
 				goto skip;
 			}
 
-		if(strstrofs(strcat(";", OnlineBanList_Servers, ";"), strcat(";", serverip, ";"), 0) != -1)
-		{
-			if(syncinterval > 0)
-				timeleft = min(syncinterval + 15, timeleft);
-				// 15 seconds for safety
-				// the ban will be prolonged on the next sync
-			Ban_Insert(ip, timeleft, strcat("ban synced from ", serverip), 0);
-			print("Ban list syncing: accepted ban of ", ip, " by ", serverip, ": ", reason, "\n");
-		}
+		if(cvar("g_ban_sync_trusted_servers_verify"))
+			if((strstrofs(strcat(";", OnlineBanList_Servers, ";"), strcat(";", serverip, ";"), 0) == -1))
+				goto skip;
 
+		if(syncinterval > 0)
+			timeleft = min(syncinterval + 15, timeleft);
+			// 15 seconds for safety
+			// the ban will be prolonged on the next sync
+		Ban_Insert(ip, timeleft, strcat("ban synced from ", serverip), 0);
+		print("Ban list syncing: accepted ban of ", ip, " by ", serverip, ": ", reason, "\n");
+
 		continue;
 :skip
 	}




More information about the nexuiz-commits mailing list