[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flood control of clients



On Dec 2, Hugo HAAS wrote:
| I'd like to have informations about the flood control made by the ircd.
| 
| In the rfc1459 (which seems to be really outdated), the following
| algorithm is described :
[description deleted]

I believe the description in the RFC is accurate for 2.8,
but the flood control mechanism changed in 2.9

| I made tests, and unfortunately, it seems to be wrong (the MODE commands
| seem to be more "controlled" than the PRIVMSG for instance, and the size
| of the PRIVMSG is important too). 

Yes,
the time is no longer incremented on a message basis
(2seconds / message), each command has its own `penalty'
value which is variable.
For example, `MODE #foo +b blah' is penalized more than
`MODE #foo' (which is only a query).

To know the exact penalties used, I fear that you really
have to dig the code.

| I tried to look at the ircd sources, but I didn't find where this control
| is made.

it is spread amond the code.. 

| Has anyone got a clue about this feature ?

check common/parse.c around line 560

Christophe