empus / armour

Armour -- an advanced eggdrop channel protection script for IRC
12 stars 11 forks source link

Add support for FLOATLIM to prevent large floodnets from joining and eliminate Excess Floods #142

Closed empus closed 3 months ago

empus commented 3 months ago

Background

A well-timed distributed botnet can disrupt channels easily with massive /join floods, exacerbated by additional annoyance from the resulting /parts.

No IRC client script can adequately prevent this because it's unable to act fast enough. For this reason, it is recommended to maintain a reasonable channel limit through channel mode +l to limit the exposure to large /join floods.


Floating Limit

Add a per-channel feature called floatlim to maintain a floating channel limit. Use some sensible default behaviour settings:

Parameter Default Description
FLOATMARGIN 10 Raise limit by this amount above the channel count
FLOATGRACE 3 Only make limit changes when usercount vs chanlimit difference is within this value
FLOATPERIOD 60 Frequency to periodically decide if limit changes are needed

Usage

Enable or disable floatlim feature:

modchan <chan> floatlim <on|off>

Frequency (in secs) to check for limit changes:

modchan <chan> floatperiod <secs>

Margin above current user count to set channel limit:

modchan <chan> floatmargin <num>

Only change limit when difference between usercount and current limit is within this grace value:

modchan <chan> floatgrace <num>

Recommendation

It is recommended that FLOATLIM is always turned on to eliminate the risk of the bot being flooded off from a large /join flood.

Preventing the bot from flooding off would mean sacrificing performance with smaller floods, which isn't acceptable when floating channel limits would better address this.

Unless cfg(float:auto) is disabled, floatlim will be automatically enabled for newly registered channels.


empus commented 3 months ago

Done