Skip to content

Commit 7a4bd5b

Browse files
committed
Use correct ip variable sans port to check ban status
1 parent 7e4fb2c commit 7a4bd5b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

code/game/g_client.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,6 @@ qboolean ClientUserinfoChanged( int clientNum, const char *reason ) {
10931093
}
10941094
}
10951095

1096-
// colors
1097-
//strcpy(c1, Info_ValueForKey( userinfo, "color" ));
1098-
10991096
// Golliwog: Check for automatic weapon reload
11001097
if(ent->r.svFlags & SVF_BOT)
11011098
{
@@ -1299,9 +1296,9 @@ const char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
12991296
return "Banned: q3unban exploit attempt";
13001297
}
13011298

1302-
if ( isLocal && !isBot && G_FilterPacket( ip, &reason ) ) {
1299+
if ( isLocal && !isBot && G_FilterPacket( cleanip, &reason ) ) {
13031300
trap_SendServerCommand( -1, va( "print \"Banned player: %s^7, tried to connect.\"", name ) );
1304-
G_LogPrintf( "ClientConnect: [Connection Refused: IP Banned] %i [%s] \"%s^7\"\n", clientNum, ip, name );
1301+
G_LogPrintf( "ClientConnect: [Connection Refused: IP Banned] %i [%s] \"%s^7\"\n", clientNum, cleanip, name );
13051302
return va("Banned: %s", reason);
13061303
}
13071304

0 commit comments

Comments
 (0)