From 117b2c94c3a8fafd9401112699158cbc81a89cd5 Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Mon, 1 Mar 2010 01:11:56 +0000 Subject: * Prevent reparsing IP addresses for subnet bans --- src/game/g_namelog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/g_namelog.c') diff --git a/src/game/g_namelog.c b/src/game/g_namelog.c index 2da09cf7..53a3f5de 100644 --- a/src/game/g_namelog.c +++ b/src/game/g_namelog.c @@ -60,12 +60,12 @@ void G_namelog_connect( gclient_t *client ) G_namelog_update_name( client ); - for( i = 0; i < MAX_NAMELOG_ADDRS && n->ip[ i ][ 0 ]; i++ ) - if( !strcmp( n->ip[ i ], client->pers.ip ) ) + for( i = 0; i < MAX_NAMELOG_ADDRS && n->ip[ i ].str[ 0 ]; i++ ) + if( !strcmp( n->ip[ i ].str, client->pers.ip.str ) ) return; if( i == MAX_NAMELOG_ADDRS ) i--; - strcpy( n->ip[ i ], client->pers.ip ); + memcpy( &n->ip[ i ], &client->pers.ip, sizeof( n->ip[ i ] ) ); } void G_namelog_disconnect( gclient_t *client ) -- cgit