From 0693f0c1b3c401df1d3b1cd3ee62bfede95f5d76 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Thu, 28 May 2009 07:52:09 +0000 Subject: [PATCH] This could never have worked in the first place. Duh. --- code/server/sv_ccmds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 482e4a2a..56a510ff 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -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; @@ -799,9 +800,11 @@ 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; } } @@ -809,9 +812,11 @@ static void SV_AddBanToList(qboolean isexception) { 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; } }