r5227 - in trunk/data: . qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Dec 15 10:16:01 EST 2008
Author: div0
Date: 2008-12-15 10:16:01 -0500 (Mon, 15 Dec 2008)
New Revision: 5227
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/ipban.qc
Log:
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: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2008-12-15 14:53:04 UTC (rev 5226)
+++ trunk/data/defaultNexuiz.cfg 2008-12-15 15:16:01 UTC (rev 5227)
@@ -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: trunk/data/qcsrc/server/ipban.qc
===================================================================
--- trunk/data/qcsrc/server/ipban.qc 2008-12-15 14:53:04 UTC (rev 5226)
+++ trunk/data/qcsrc/server/ipban.qc 2008-12-15 15:16:01 UTC (rev 5227)
@@ -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