diff options
author | Tony J. White <tjw@tjw.org> | 2006-12-11 04:05:01 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2006-12-11 04:05:01 +0000 |
commit | aca1cf72bc6889fef88e324936c2cddfc38b6868 (patch) | |
tree | cc0f81f2f6249fb9f818549790ef9b0f1bb5bd9b | |
parent | f8dbabb1f12c8b97c091b1b4f37aeb13ee380a86 (diff) |
* (bug 2812) limit team joining to once per client per second to prevent
cmd overflow by malicious clients
-rw-r--r-- | src/game/g_cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 72c4d8ff..14530bfa 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -659,6 +659,10 @@ void Cmd_Team_f( gentity_t *ent ) char s[ MAX_TOKEN_CHARS ]; qboolean force = G_admin_permission(ent, ADMF_FORCETEAMCHANGE); + // stop team join spam + if( level.time - ent->client->pers.teamChangeTime < 1000 ) + return; + trap_Argv( 1, s, sizeof( s ) ); if( !strlen( s ) ) |