diff options
author | John Ellis <johne@verizon.net> | 2011-02-07 01:15:29 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:58 +0000 |
commit | 260fac5d9d33140369444f57a1819430bc6dd1f4 (patch) | |
tree | 70356d3d12221e47602f34a6a0925d271958b1d6 /src/game | |
parent | ab87264c4d31fbd17a663af0aa47da7543f58883 (diff) |
* Fix ban reason alignment for expired bans
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 9c7c92d1..f58e2607 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2209,6 +2209,7 @@ static void ban_out( void *ban, char *str ) int i; int colorlen1 = 0; char duration[ MAX_DURATION_LENGTH ]; + char *d_color = S_COLOR_WHITE; char date[ 11 ]; g_admin_ban_t *b = ( g_admin_ban_t * )ban; int t = trap_RealTime( NULL ); @@ -2230,16 +2231,19 @@ static void ban_out( void *ban, char *str ) G_admin_duration( b->expires ? b->expires - t : - 1, duration, sizeof( duration ) ); else - Q_strncpyz( duration, S_COLOR_CYAN "expired" S_COLOR_WHITE, - sizeof( duration ) ); + { + Q_strncpyz( duration, "expired", sizeof( duration ) ); + d_color = S_COLOR_CYAN; + } Com_sprintf( str, MAX_STRING_CHARS, "%-*s %s%-15s " S_COLOR_WHITE "%-8s %s" - "\n \\__ %-*s %s", + "\n \\__ %s%-*s " S_COLOR_WHITE "%s", MAX_NAME_LENGTH + colorlen1 - 1, b->name, ( strchr( b->ip.str, '/' ) ) ? S_COLOR_RED : S_COLOR_WHITE, b->ip.str, date, b->banner, + d_color, MAX_DURATION_LENGTH - 1, duration, b->reason ); |