mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 12:11:34 +00:00
Fix for pause flood exploit.
This commit is contained in:
parent
7234a479c8
commit
0bbc70dbd6
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue