summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2019-02-21 16:51:48 +0100
committerPaweł Redman <pawel.redman@gmail.com>2019-02-21 16:51:48 +0100
commit042af2ecd7027b621808289efe2717cfc41b97ee (patch)
tree312105601a1965fd603344d08e77ebf344e7a465 /src
parente85b707a419a6a4daf4192da4fcbdd8d5fd57b22 (diff)
Display duration in ban broadcasts.
Diffstat (limited to 'src')
-rw-r--r--src/game/g_admin.c20
1 files changed, 14 insertions, 6 deletions
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 )
{