diff options
author | kai <kai@zittrig.eu> | 2020-04-02 18:36:00 +0100 |
---|---|---|
committer | kai <kai@zittrig.eu> | 2020-04-02 18:36:00 +0100 |
commit | 25558f0b74c4ac4ec6f4b34485e3438f93d07544 (patch) | |
tree | ad1ae64786fe9c3bd22e78139416c98a478138df /src | |
parent | 92dfebfc6424b2cb634ee15fef0029f7974b1e2b (diff) |
minor listplayers improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 8 | ||||
-rw-r--r-- | src/game/g_admin.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 4c2e963..12c50b2 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -1854,6 +1854,8 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg ) qboolean level_open, admin_open, ban_open, command_open; int i; + admin_level_maxname = 0; // reset this or all sorts of weird shit happens + G_admin_cleanup(); if( !g_admin.string[ 0 ] ) @@ -2095,7 +2097,7 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg ) // max printable name length for formatting for( i = 0; i < MAX_ADMIN_LEVELS && g_admin_levels[ i ]; i++ ) { - G_DecolorString( l->name, n ); + G_DecolorString( g_admin_levels[ i ]->name, n ); if( strlen( n ) > admin_level_maxname ) admin_level_maxname = strlen( n ); } @@ -5039,7 +5041,7 @@ qboolean G_admin_listplayers( gentity_t *ent, int skiparg ) } if ( G_admin_permission(ent, ADMF_SEESFULLLISTPLAYERS ) ) { - ADMBP( va( "%2i %s%s^7 %-2i %s^7 ^1%1s%1s%1s%1s%1s^7 %s^7 %s%s^7%s\n", + ADMBP( va( "%2i %s%s^7 %-3i %s^7 ^1%1s%1s%1s%1s%1s^7 %s^7 %s%s^7%s\n", i, c, t, @@ -5056,7 +5058,7 @@ qboolean G_admin_listplayers( gentity_t *ent, int skiparg ) ( *n ) ? ")" : "" ) ); } else { - ADMBP( va( "%2i %s%s^7 %-2i %s^7 ^1%1s%1s%1s%1s^7 %s^7 %s%s^7%s\n", + ADMBP( va( "%2i %s%s^7 %-3i %s^7 ^1%1s%1s%1s%1s^7 %s^7 %s%s^7%s\n", i, c, t, diff --git a/src/game/g_admin.h b/src/game/g_admin.h index e2cc0ac..e3779f9 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define ADMBP_begin() G_admin_buffer_begin() #define ADMBP_end() G_admin_buffer_end(ent) -#define MAX_ADMIN_LEVELS 32 +#define MAX_ADMIN_LEVELS 128 #define MAX_ADMIN_ADMINS 1024 #define MAX_ADMIN_BANS 1024 #define MAX_ADMIN_NAMELOGS 128 |