[DONE] Extend floodprot with drop action + repeat trigger

These are old archives. They are kept for historic purposes only.

Moderators: Gottem, Supporters

Post Reply
Gottem
UnrealIRCd coder
Posts: 194
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

[DONE] Extend floodprot with drop action + repeat trigger

Post by Gottem »

So alhoceima suggested on IRC that someone extend Syzop's floodprot module (the one that gives you chanmode +f). Since it's a core module you have to remove it from modules.default.conf, but since that file gets overwritten during an upgrade, you better use a separate (remote) include. =]

I contemplated implementing those with another module, but there aren't any proper mode flags available. ;_;

Since I'm not gonna rehash Syzop's documentation, refer to this page for the current arguments. My modification implements the following:
  • An action D to just drop the message (I thought about using B but since there's also b this might get confuzzling).
  • A floodtype r that catches repeated messages (sort of like my m_repeatprot but channel-bound instead of network-wide). It allows the actions D (drop) and b (kickban).
An example mode could be: /mode #chan +f [2r#D]:15, so people using the same line twice in 15 seconds will get flagged. The third one will be dropped and a slightly cryptic message is shown to the spammer. Similar to m_repeatprot it will catch alternated messages. ;3

Git the mod here
If you like my modules, consider donating (credit card/iDEAL/Bancontact, use the custom job fee option in my shop) ;];]
Gottem
UnrealIRCd coder
Posts: 194
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Extend floodprot with drop action + repeat trigger

Post by Gottem »

Thanks to another tip from alhoceima, the checks are now colour/markup agnostic. That is, bold/underline/etc and colours will be stripped before matching. =]
If you like my modules, consider donating (credit card/iDEAL/Bancontact, use the custom job fee option in my shop) ;];]
alhoceima
Posts: 32
Joined: Mon Jul 18, 2016 10:35 pm

Re: [DONE] Extend floodprot with drop action + repeat trigger

Post by alhoceima »

i updated to latest UnrealIRCd-4.0.10 and +f [2r#D]:15 didnt seem to detect repeated lines
Gottem
UnrealIRCd coder
Posts: 194
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Extend floodprot with drop action + repeat trigger

Post by Gottem »

Well, 4.0.10 brings some changes regarding how module are handled afaik. My net will update soon and I'll re-test my modules on that version then. ;]
If you like my modules, consider donating (credit card/iDEAL/Bancontact, use the custom job fee option in my shop) ;];]
Gottem
UnrealIRCd coder
Posts: 194
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Extend floodprot with drop action + repeat trigger

Post by Gottem »

I've improved the logic for determining whether something is repeated or simply text spam. Should work fine now. ;]

Grab the latest version from the git link in the OP.
If you like my modules, consider donating (credit card/iDEAL/Bancontact, use the custom job fee option in my shop) ;];]
Post Reply