diff options
author | narbatucker <narbatucker@hackintosh.local> | 2019-02-21 14:33:54 +0000 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-02-21 16:05:09 +0100 |
commit | 4e3addb96f0dc720aaae1b31cc474967dacd2040 (patch) | |
tree | 367d1ed0f11bdf3a5890c8e538a49c2f7b3ddbd2 /src | |
parent | cc57d1bf292667944c2712333c226defe4204417 (diff) |
change the ban & kick messages
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index cb42e31..3f42d16 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -3263,6 +3263,12 @@ qboolean G_admin_kick( gentity_t *ent, int skiparg ) ( *reason ) ? reason : "kicked by admin", notice ) ); } + AP( va( "print \"^3!kick:^7 %s^7 has been kicked by %s^7. " + "reason: %s\n\"", + vic->client->pers.netname, + ( ent ) ? G_admin_adminPrintName( ent ) : "console", + ( *reason ) ? reason : "kicked by admin" ) ); + G_LogPrintf( "kick: %i %i [%s] (%s) %s^7 %s^7\n", vic->client->ps.clientNum, G_admin_parse_time( g_adminTempBan.string ), @@ -3271,9 +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 ], va( "kicked%s^7, reason: %s", - ( ent ) ? va( " by %s", G_admin_adminPrintName( ent ) ) : " by console", - ( *reason ) ? reason : "kicked by admin" ) ); + trap_DropClient( pids[ 0 ], "disconnected." ); return qtrue; } @@ -3468,17 +3472,27 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg ) g_admin_namelog[ logmatch ]->name[ 0 ], ( *reason ) ? reason : "banned by admin" ); - if( g_admin_namelog[ logmatch ]->slot == -1 ) - { - // client is already disconnected so stop here - AP( va( "print \"^3!ban:^7 %s^7 has been banned by %s^7 " + 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 ) + { + // client is already disconnected so stop here return qtrue; } + vic = &g_entities[ g_admin_namelog[ logmatch ]->slot ]; G_admin_autorevert( vic ); @@ -3495,11 +3509,7 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg ) ( *reason ) ? reason : "banned by admin", notice ) ); } - trap_DropClient( g_admin_namelog[ logmatch ]->slot, - va( "banned by %s^7, duration: %s, reason: %s", - ( ent ) ? G_admin_adminPrintName( ent ) : "console", - duration, - ( *reason ) ? reason : "banned by admin" ) ); + trap_DropClient( g_admin_namelog[ logmatch ]->slot, va( "disconnected." ) ); return qtrue; } |