Change default flood rates to match RFC1459, prevent excess flood problems

I noticed that the default network flood rates are wrong (for most
networks). It has been very standard since the beginning of IRC to use a
value of 2 seconds per line, with a 10 line head start. Almost all
networks work this way, and if you don't follow, having a lot of
channels or a lot of clients connected to ZNC results in excess flood
disconnections and much frustration for the user.

I think you should make the default value for these 2 and 9 instead of 1
and 4 so that this nasty bug doesn't hit people who will not know how to
debug it. You find these same types of settings built into every IRC
client. 2 and 10 is the standard. 2 and 9 provides a slight buffer so
there is no mistake.

Thanks
-Rubin

Close #1416
This commit is contained in:
Rubin
2017-05-29 01:23:44 -07:00
committed by Alexey Sokolov
parent 10bfece38c
commit 96c92ef8ca
4 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -799,11 +799,11 @@ TEST_F(ZNCTest, ControlpanelModule) {
Z;
client.Write(request + "GetNetwork FloodRate user freenode");
client.ReadUntil(response + "FloodRate = 1.00");
client.ReadUntil(response + "FloodRate = 2.00");
Z;
client.Write(request + "GetNetwork FloodBurst user freenode");
client.ReadUntil(response + "FloodBurst = 4");
client.ReadUntil(response + "FloodBurst = 9");
Z;
client.Write(request + "GetNetwork JoinDelay user freenode");
@@ -1386,11 +1386,11 @@ TEST_F(ZNCTest, ControlpanelModule) {
Z;
client.Write(request + "GetNetwork FloodRate KindOne freenode");
client.ReadUntil(response + "FloodRate = 1.00");
client.ReadUntil(response + "FloodRate = 2.00");
Z;
client.Write(request + "GetNetwork FloodBurst KindOne freenode");
client.ReadUntil(response + "FloodBurst = 4");
client.ReadUntil(response + "FloodBurst = 9");
Z;
client.Write(request + "GetNetwork JoinDelay KindOne freenode");