summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2010-02-28 19:07:21 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:28 +0000
commit3658be27d4e27b04dbef5eefa3b460f50c69b5be (patch)
tree9ec6bf3284b1bc4b7113609b4b8005c330a89f9e /src/game/g_client.c
parent017e9e78a20af3646a6feb65c4d55bfd08abdcfa (diff)
* Revert buggy part of revision 1968
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