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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index b241c110..c3afede2 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -971,7 +971,7 @@ The game can override any of the settings and call trap_SetUserinfo
if desired.
============
*/
-char *ClientUserinfoChanged( int clientNum )
+char *ClientUserinfoChanged( int clientNum, qboolean forceName )
{
gentity_t *ent;
char *s;
@@ -1016,7 +1016,7 @@ char *ClientUserinfoChanged( int clientNum )
if( strcmp( oldname, newname ) )
{
- if( client->pers.namelog->nameChangeTime &&
+ if( !forceName && client->pers.namelog->nameChangeTime &&
level.time - client->pers.namelog->nameChangeTime <=
g_minNameChangePeriod.value * 1000 )
{
@@ -1025,7 +1025,7 @@ char *ClientUserinfoChanged( int clientNum )
g_minNameChangePeriod.integer ) );
revertName = qtrue;
}
- else if( g_maxNameChanges.integer > 0 &&
+ else if( !forceName && g_maxNameChanges.integer > 0 &&
client->pers.namelog->nameChanges >= g_maxNameChanges.integer )
{
trap_SendServerCommand( ent - g_entities, va(
@@ -1033,7 +1033,7 @@ char *ClientUserinfoChanged( int clientNum )
g_maxNameChanges.integer ) );
revertName = qtrue;
}
- else if( client->pers.namelog->muted )
+ else if( !forceName && client->pers.namelog->muted )
{
trap_SendServerCommand( ent - g_entities,
"print \"You cannot change your name while you are muted\n\"" );
@@ -1056,7 +1056,7 @@ char *ClientUserinfoChanged( int clientNum )
{
Q_strncpyz( client->pers.netname, newname,
sizeof( client->pers.netname ) );
- if( client->pers.connected == CON_CONNECTED )
+ if( !forceName && client->pers.connected == CON_CONNECTED )
{
client->pers.namelog->nameChangeTime = level.time;
client->pers.namelog->nameChanges++;
@@ -1265,7 +1265,7 @@ char *ClientConnect( int clientNum, qboolean firstTime )
// get and distribute relevent paramters
G_namelog_connect( client );
- userInfoError = ClientUserinfoChanged( clientNum );
+ userInfoError = ClientUserinfoChanged( clientNum, qfalse );
if( userInfoError != NULL )
return userInfoError;