From 40a6e9296da1a5662f2c2a978860f194cb9a4336 Mon Sep 17 00:00:00 2001 From: MaeJong Date: Sun, 7 May 2017 19:13:47 +0200 Subject: Prevent usage of IRC-like channels during scrims Using /join 0-9 and then using those hidden channels with /0-9, you could easily ghost during scrims. --- src/game/g_cmds.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8203454..25a9eab 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1636,6 +1636,14 @@ void Cmd_Channel_f( gentity_t *ent ) qboolean who = qfalse; gentity_t *target; + if( ent && ent->client->pers.teamSelection == PTE_NONE && + g_scrimMode.integer != 0 && + !G_admin_permission( ent, ADMF_NOSCRIMRESTRICTION ) ) + { + trap_SendServerCommand( ent-g_entities, "print \"You can't chat when scrim mode is enabled.\n\"" ); + return; + } + if( g_floodMinTime.integer && G_Flood_Limited( ent ) ) { -- cgit