From 042af2ecd7027b621808289efe2717cfc41b97ee Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 21 Feb 2019 16:51:48 +0100 Subject: Display duration in ban broadcasts. --- src/game/g_admin.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/game') diff --git a/src/game/g_admin.c b/src/game/g_admin.c index c7a69e7..fc078b9 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -3472,12 +3472,20 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg ) g_admin_namelog[ logmatch ]->name[ 0 ], ( *reason ) ? reason : "banned by admin" ); - AP( va( "print \"^3!ban:^7 %s^7 has been %s by %s^7. " - "reason: %s\n\"", - g_admin_namelog[ logmatch ]->name[ 0 ], - seconds == 0 ? "^1PERMABANNED^7" : "banned", - ( ent ) ? G_admin_adminPrintName( ent ) : "console", - ( *reason ) ? reason : "banned by admin" ) ); + if( seconds == 0 ){ + AP( va( "print \"^3!ban:^7 %s^7 has been ^1PERMABANNED^7 by %s^7. " + "reason: %s\n\"", + g_admin_namelog[ logmatch ]->name[ 0 ], + ( ent ) ? G_admin_adminPrintName( ent ) : "console", + ( *reason ) ? reason : "banned by admin" ) ); + } else { + AP( va( "print \"^3!ban:^7 %s^7 has been banned by %s^7. " + "duration: %s, reason: %s\n\"", + g_admin_namelog[ logmatch ]->name[ 0 ], + ( ent ) ? G_admin_adminPrintName( ent ) : "console", + duration, + ( *reason ) ? reason : "banned by admin" ) ); + } if( g_admin_namelog[ logmatch ]->slot == -1 ) { -- cgit