1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 06:03:13 +02:00

Add set::anti-flood options lag-penalty and lag-penalty-sec.

This also allows known-users to execute slightly more commands per second.

For people who want their trusted users/bots to allow even more commands
per second (eg 20cmds/sec) we now have a nice FAQ item that uses this:
https://www.unrealircd.org/docs/FAQ#high-command-rate
This commit is contained in:
Bram Matthys
2021-06-23 16:19:45 +02:00
parent 28f98da5f8
commit e80c7b5b65
6 changed files with 79 additions and 1 deletions
+8
View File
@@ -796,6 +796,14 @@ static void stats_set_anti_flood(Client *client, FloodSettings *f)
f->name, floodoption_names[i],
(int)f->limit[i], pretty_time_val(f->period[i]));
}
if (i == FLD_LAG_PENALTY)
{
sendtxtnumeric(client, "anti-flood::%s::lag-penalty: %d msec",
f->name, (int)f->period[i]);
sendtxtnumeric(client, "anti-flood::%s::lag-penalty-bytes: %d",
f->name,
f->limit[i] == INT_MAX ? 0 : (int)f->limit[i]);
}
else
{
sendtxtnumeric(client, "anti-flood::%s::%s: %d per %s",