diff options
author | MaeJong <mewiceclair@gmail.com> | 2017-05-07 19:13:47 +0200 |
---|---|---|
committer | MaeJong <mewiceclair@gmail.com> | 2017-05-08 06:21:30 +0200 |
commit | 40a6e9296da1a5662f2c2a978860f194cb9a4336 (patch) | |
tree | d4b8fae374fe96fdc2b7b4db851d0b2a63401649 | |
parent | c6a50934a546ddd12cf4725f4f8ec30f7adeb839 (diff) |
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.
-rw-r--r-- | src/game/g_cmds.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 ) ) { |