diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2019-02-21 16:10:27 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-02-21 16:10:27 +0100 |
commit | e85b707a419a6a4daf4192da4fcbdd8d5fd57b22 (patch) | |
tree | 5a59818c310b058560608c70abd675a02c071054 /src/game | |
parent | 4e3addb96f0dc720aaae1b31cc474967dacd2040 (diff) |
Minor fixes to the last commit.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 3f42d16..c7a69e7 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -3277,7 +3277,7 @@ qboolean G_admin_kick( gentity_t *ent, int skiparg ) vic->client->pers.netname, ( *reason ) ? reason : "automatic temp ban created by kick" ); - trap_DropClient( pids[ 0 ], "disconnected." ); + trap_DropClient( pids[ 0 ], "disconnected" ); return qtrue; } @@ -3472,27 +3472,19 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg ) g_admin_namelog[ logmatch ]->name[ 0 ], ( *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" ) ); - } + 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( g_admin_namelog[ logmatch ]->slot == -1 ) + if( g_admin_namelog[ logmatch ]->slot == -1 ) { // client is already disconnected so stop here return qtrue; } - + vic = &g_entities[ g_admin_namelog[ logmatch ]->slot ]; G_admin_autorevert( vic ); @@ -3509,7 +3501,7 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg ) ( *reason ) ? reason : "banned by admin", notice ) ); } - trap_DropClient( g_admin_namelog[ logmatch ]->slot, va( "disconnected." ) ); + trap_DropClient( g_admin_namelog[ logmatch ]->slot, "disconnected" ); return qtrue; } |