diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_cmds.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 1c96ede..8203454 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1171,15 +1171,12 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) color = COLOR_MAGENTA; } break; - + case SAY_HADMINS: - if( G_admin_permission( ent, ADMF_HIGHADMINCHAT ) ) - { - G_LogPrintf( "say_hadmins: ^7[^1HIGH ADMIN^7]%s^7: %s^7\n", ( ent ) ? ent->client->pers.netname : "console", chatText ); - Com_sprintf( name, sizeof( name ), "%s^7[^1HIGH ADMIN^7]%s%c%c"EC": ", prefix, - ( ent ) ? ent->client->pers.netname : "console", Q_COLOR_ESCAPE, COLOR_WHITE ); - color = COLOR_WHITE; - } + G_LogPrintf( "say_hadmins: ^7[^1HIGH ADMIN^7]%s^7: %s^7\n", ( ent ) ? ent->client->pers.netname : "console", chatText ); + Com_sprintf( name, sizeof( name ), "%s^7[^1HIGH ADMIN^7]%s%c%c"EC": ", prefix, + ( ent ) ? ent->client->pers.netname : "console", Q_COLOR_ESCAPE, COLOR_WHITE ); + color = COLOR_WHITE; break; } @@ -1351,16 +1348,21 @@ static void Cmd_Say_f( gentity_t *ent ) } } - if( ( !Q_stricmpn( args, "say /ha ", 8) || + if( !Q_stricmpn( args, "say /ha ", 8) || !Q_stricmpn( args, "say_team /ha ", 13) || !Q_stricmpn( args, "say /say_hadmins ", 17) || !Q_stricmpn( args, "say_team /say_hadmins ", 22) ) - && G_admin_permission( ent, ADMF_HIGHADMINCHAT ) ) { mode = SAY_HADMINS; skipargs=1; } + if( mode == SAY_HADMINS && !G_admin_permission( ent, ADMF_HIGHADMINCHAT ) ) + { + ADMP( "You don't have the permission to use the high admin chat.\n" ); + return; + } + if(!Q_stricmpn( args, "say /me ", 8 ) ) { if( g_actionPrefix.string[0] ) |