Skip to content

Commit

Permalink
This could never have worked in the first place. Duh.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Schulz committed May 28, 2009
1 parent 372c2ea commit 0693f0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/server/sv_ccmds.c
Expand Up @@ -714,6 +714,7 @@ Ban a user from being able to play on this server based on his ip address.
static void SV_AddBanToList(qboolean isexception)
{
char *banstring;
char addy2[NET_ADDRSTRMAXLEN];
netadr_t ip;
int index, argc, mask;
serverBan_t *curban;
Expand Down Expand Up @@ -799,19 +800,23 @@ static void SV_AddBanToList(qboolean isexception)
{
if((curban->isexception || !isexception) && NET_CompareBaseAdrMask(curban->ip, ip, curban->subnet))
{
Q_strncpyz(addy2, NET_AdrToString(ip), sizeof(addy2));

Com_Printf("Error: %s %s/%d supersedes %s %s/%d\n", curban->isexception ? "Exception" : "Ban",
NET_AdrToString(curban->ip), curban->subnet,
isexception ? "exception" : "ban", NET_AdrToString(ip), mask);
isexception ? "exception" : "ban", addy2, mask);
return;
}
}
if(curban->subnet >= mask)
{
if(!curban->isexception && isexception && NET_CompareBaseAdrMask(curban->ip, ip, mask))
{
Q_strncpyz(addy2, NET_AdrToString(curban->ip), sizeof(addy2));

Com_Printf("Error: %s %s/%d supersedes already existing %s %s/%d\n", isexception ? "Exception" : "Ban",
NET_AdrToString(ip), mask,
curban->isexception ? "exception" : "ban", NET_AdrToString(curban->ip), curban->subnet);
curban->isexception ? "exception" : "ban", addy2, curban->subnet);
return;
}
}
Expand Down

0 comments on commit 0693f0c

Please sign in to comment.