summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index b301bf48..9820fa31 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,9 +1053,11 @@ 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++;
+ }
if( *oldname )
{
trap_SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE