Page 1 of 1

[DONE] Extend floodprot with drop action + repeat trigger

Posted: Fri Nov 25, 2016 9:39 pm
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

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

Posted: Sat Nov 26, 2016 5:20 pm
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. =]

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

Posted: Sat Jan 21, 2017 2:54 pm
by alhoceima
i updated to latest UnrealIRCd-4.0.10 and +f [2r#D]:15 didnt seem to detect repeated lines

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

Posted: Sat Jan 21, 2017 4:12 pm
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. ;]

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

Posted: Tue Jan 24, 2017 9:52 pm
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.