summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIronClawTrem <louie.nutman@gmail.com>2020-05-14 18:52:41 +0100
committerIronClawTrem <louie.nutman@gmail.com>2020-05-14 18:52:41 +0100
commitaa9cdd863ac4d1d0ab6ef6e590be71aaae5ca44b (patch)
tree81e7ff3b6e3d0c89e500736072de007a46b48f10 /src
parent160bb2cba5a8281c2ab3c9a1d94f89657deddea1 (diff)
Fix removing name colour upon using !register
This was a direct result of the commit ''Don't allow ''UnnamedPlayer'' to be registered''
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;