diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-03 12:36:22 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:06 +0000 |
commit | 567938d0a588d8e9230e1fe5f9d321c8ddd4aa54 (patch) | |
tree | 18cd3dd507332de23311d108fdf265c936223da1 /src/game/g_cmds.c | |
parent | dee62e154291901073895a55715124061c61de03 (diff) |
* Fix semicolon I forgot during the previous commit
* (bug 3997) Add g_specChat to silence chatty spectators during matches
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index ae48940d..8dede827 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -723,6 +723,16 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) else prefix = ""; + // check if blocked by g_specChat 0 + if( ( !g_specChat.integer ) && ( mode != SAY_TEAM ) && + ( ent ) && ( ent->client->pers.teamSelection == TEAM_NONE ) && + ( !G_admin_permission( ent, ADMF_NOCENSORFLOOD ) ) ) + { + trap_SendServerCommand( ent-g_entities, va( "print \"Global chatting for " + "spectators has been disabled. You may only use team chat.\n\"") ); + return; + } + switch( mode ) { default: |