summaryrefslogtreecommitdiff
path: root/src/game/g_namelog.c
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2010-03-01 01:11:56 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:29 +0000
commit117b2c94c3a8fafd9401112699158cbc81a89cd5 (patch)
treedd51952a3a0c3f36242bb837e917e4f7165002dc /src/game/g_namelog.c
parentff82aefa975e52f1e25b090225b36645b57faa97 (diff)
* Prevent reparsing IP addresses for subnet bans
Diffstat (limited to 'src/game/g_namelog.c')
-rw-r--r--src/game/g_namelog.c6
1 files changed, 3 insertions, 3 deletions
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 )