diff options
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r-- | src/game/g_admin.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 4774449..0677e6f 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -4247,13 +4247,6 @@ qboolean G_admin_flag( gentity_t *ent ) trap_Argv( 1, name, sizeof( name ) ); if( name[ 0 ] == '*' ) { - if( ent ) - { - ADMP( va( "^3%s: only console can change admin level flags\n", - command ) ); - return qfalse; - } - id = atoi( name + 1 ); level = G_admin_level( id ); if( !level ) @@ -4385,6 +4378,7 @@ qboolean G_admin_stats( gentity_t *ent ) gentity_t *targ; int i; qboolean header = qfalse; + char err[ MAX_STRING_CHARS ]; const static char *cswNames[ ] = { #define CSW(a,b,c,d) c @@ -4395,18 +4389,17 @@ qboolean G_admin_stats( gentity_t *ent ) if( trap_Argc( ) > 1 ) { char name[ MAX_NAME_LENGTH ]; - namelog_t *vic; + int pid; trap_Argv( 1, name, sizeof( name ) ); - if( !( vic = G_NamelogFromString( ent, name ) ) || - vic->slot <= -1 ) + if( ( pid = G_ClientNumberFromString( name, err, sizeof( err ) ) ) == -1 ) { - ADMP( "^3stats: ^7no match\n" ); + ADMP( va( "^3stats: ^7%s", err ) ); return qfalse; } - targ = g_entities + vic->slot; + targ = g_entities + pid; } else { |