Fix for pause flood exploit.

This commit is contained in:
Dabb 2000-08-13 14:21:21 +00:00
parent 7234a479c8
commit 0bbc70dbd6

View file

@ -955,8 +955,19 @@ SV_Pause_f
*/ */
void SV_Pause_f (void) void SV_Pause_f (void)
{ {
static double lastpausetime;
double currenttime;
char st[sizeof(host_client->name) + 32]; char st[sizeof(host_client->name) + 32];
currenttime=Sys_DoubleTime();
if (lastpausetime+1>currenttime) {
SV_ClientPrintf (host_client, PRINT_HIGH, "Pause flood not allowed.\n");
return;
}
lastpausetime=currenttime;
if (!pausable->value) { if (!pausable->value) {
SV_ClientPrintf (host_client, PRINT_HIGH, "Pause not allowed.\n"); SV_ClientPrintf (host_client, PRINT_HIGH, "Pause not allowed.\n");
return; return;