summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_admin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 9d9e902..6a5d16e 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -6106,10 +6106,12 @@ qboolean G_admin_spec999( gentity_t *ent, int skiparg )
qboolean G_admin_register(gentity_t *ent, int skiparg ){
int level = 0;
+ char name[ MAX_NAME_LENGTH ];
if( !ent ) return qtrue;
level = G_admin_level(ent);
+ memcpy( name, ent->client->pers.netname, sizeof( name ) );
if( level == 0 )
level = 1;
@@ -6121,7 +6123,7 @@ qboolean G_admin_register(gentity_t *ent, int skiparg ){
return qfalse;
}
- if( !Q_stricmp( Q_CleanStr( ent->client->pers.netname ), "UnnamedPlayer" ) )
+ if( !Q_stricmp( Q_CleanStr( name ), "UnnamedPlayer" ) )
{
ADMP( va( "^3!register:^7 You cannot register 'UnnamedPlayer'.\n" ) );
return qfalse;