diff options
author | M. Kristall <mkpdev@gmail.com> | 2010-02-28 18:54:30 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:28 +0000 |
commit | 017e9e78a20af3646a6feb65c4d55bfd08abdcfa (patch) | |
tree | 590735d520252cfaff294b0476ccd5b3b5c9c4ac /src/game | |
parent | 7411884e68e94dda2d229834e2043226f78d4717 (diff) |
* namelog was not showing name changes when the user's initial name was invalid
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_client.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index fc1ea9a7..b301bf48 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1023,7 +1023,7 @@ void ClientUserinfoChanged( int clientNum ) revertName = qtrue; } else if( g_maxNameChanges.integer > 0 && - client->pers.namelog->nameChanges >= g_maxNameChanges.integer ) + client->pers.namelog->nameChanges > g_maxNameChanges.integer ) { trap_SendServerCommand( ent - g_entities, va( "print \"Maximum name changes reached (g_maxNameChanges = %d)\n\"", @@ -1053,12 +1053,9 @@ void ClientUserinfoChanged( int clientNum ) { Q_strncpyz( client->pers.netname, newname, sizeof( client->pers.netname ) ); + client->pers.namelog->nameChanges++; if( client->pers.connected == CON_CONNECTED ) - { client->pers.namelog->nameChangeTime = level.time; - client->pers.namelog->nameChanges++; - } - G_namelog_update_name( client ); if( *oldname ) { trap_SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE @@ -1069,6 +1066,7 @@ void ClientUserinfoChanged( int clientNum ) DECOLOR_OFF, client->pers.netname, DECOLOR_ON ); } } + G_namelog_update_name( client ); } // set max health |