From c598ff7b048a34cc47954436cbc83b3271b2d079 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 4 Oct 2011 00:21:19 +0200 Subject: [PATCH] Fold client_flood_burst_rate check into MAX_FLOOD_BURST. The original definition of floodgrace was MAX_FLOOD_BURST lines per second. A second check for another number of lines per second makes no sense. --- include/packet.h | 4 ++-- src/packet.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/packet.h b/include/packet.h index 35f6c41f..88d22790 100644 --- a/include/packet.h +++ b/include/packet.h @@ -39,7 +39,7 @@ /* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client, * anything beyond MAX_FLOOD is limited to about one line per second. * - * MAX_FLOOD_CONN is the amount of lines we allow from a client who has + * MAX_FLOOD_BURST is the amount of lines we allow from a client who has * just connected. this allows clients to rejoin multiple channels * without being so heavily penalised they excess flood. */ @@ -47,7 +47,7 @@ * spb: Made these configurable */ #define MAX_FLOOD ConfigFileEntry.client_flood_burst_max -#define MAX_FLOOD_BURST MAX_FLOOD * 8 +#define MAX_FLOOD_BURST ConfigFileEntry.client_flood_burst_rate extern PF read_packet; diff --git a/src/packet.c b/src/packet.c index 6f14aa92..3f58844b 100644 --- a/src/packet.c +++ b/src/packet.c @@ -123,9 +123,6 @@ parse_client_queued(struct Client *client_p) { if(client_p->localClient->sent_parsed >= client_p->localClient->allow_read) break; - /* spb: Add second layer of throttling to n lines per second, even during burst */ - if(client_p->localClient->actually_read >= ConfigFileEntry.client_flood_burst_rate) - break; } /* allow opers 4 times the amount of messages as users. why 4?