Quake DeveLS - No More Flooding!

Author: Cryect
Difficulty: Easy

Okay I've had enough of people flooding everyone on servers sure flood protection is in the latest Q2 and CTF but what good does that do for all the mods. Well don't worry because here is a simple tutorial to fix all those problems

First add this code to the client structure in "g_local.h".

//Flood prevention variables
float floodtime1;
float floodtime2;

Alright now goto Cmd_Say_f in "g_cmds.c" and put this code right after the declaration of variables.
	//flood protection code
	int		floodtime;
	
	
	if(ent->client->floodtime2client->floodtime1>level.time)
			ent->client->floodtime2 = level.time + 10;
	}
	else
	{
		floodtime=(int)(ent->client->floodtime2-level.time);
		gi.cprintf(ent, PRINT_HIGH, "Cannot talk for %i more seconds/n",floodtime);
		return;
	}
	
	ent->client->floodtime1 = level.time + 15;
	//end flood protection code

Okay thats all it takes! Well some suggestions are to set it up for CVARS so the servers can change the numbers.

Tutorial by Cryect


This site, and all content and graphics displayed on it,
are ©opyrighted to the Quake DeveLS team. All rights received.
Got a suggestion? Comment? Question? Hate mail? Send it to us!
Oh yeah, this site is best viewed in 16 Bit or higher, with the resolution on 800*600.
Thanks to Planet Quake for there great help and support with hosting.
Best viewed with Netscape 4 or IE 3