https://github.com/inspircd/inspircd-ex ... hlight.cpp
Indeed I think that should be ported to UnrealIRCd since it's a great idea.
Maybe adding a block into unrealircd.conf like:
blockhighlights {
maxnicks 5; /* Maximum number of nicknames to be highlighted in one line */
action gline; /* What to do in case of mass highlight */
duration 7d; /* Duration of the ban */
reason "Mass highlight isn't appreciated on this network"; /* Ban reason */
};
This would be good also, because spammers constantly changed their "publicity" lines, so spamfilter becomes ineffective quickly. But they usually use the max number possible of highlighted nicks in one line.
What do you think?
====================
[Gottem EDIT 20181104] Current information should probably be displayed in the first post and not somewhere down the thread. :>
Aye we good fam.
It keeps track of a user's messages on a per-channel basis and checks if they highlight one person too many times or too many different persons at once (as per the alternation thing mentioned earlier). Opers and U:Lines are exempt (as per usual), but also those with list modes +a and +q. When someone hits the threshold, opers with the snomask "EYES" will get a server notice through the module (enable that snomask with /mode <nick> +s +e).
Config block:
The module doesn't necessarily require any configuration, it uses the following block as defaults
Code: Select all
block_masshighlight {
maxnicks 5;
delimiters " ,.-_/\:;";
action gline;
duration 7d;
reason "No mass highlighting allowed";
snotice 1;
banident 1;
multiline 0;
allow_authed 0;
//allow_accessmode o; // k4be
percent 1; // k4be
show_opers_origmsg 1; // k4be
};
- maxnicks: Maximum amount of highlights (going over this number results in action setting in) -- works in conjunction with percent
- delimiters: List of characters to split a sentence by (don't forget the surrounding quotes ;]) -- any char not in the default list may prevent highlights anyways
- action: Action to take, must be one of: drop (drop silently [for the offender]), notice (drop, but do show notice to them), gline, zline, shun, tempshun, kill, viruschan
- duration: How long to gline, zline or shun for, is a "timestring" like 7d, 1h5m20s, etc
- reason: Reason to show to the user, must be at least 4 chars long
- snotice: Whether to send snomask notices when users cross the highlight threshold, must be 0 or 1
- banident: When set to 1 it will ban ident@iphost, otherwise *@iphost (useful for shared ZNCs etc)
- multiline: When set to 1 it will keep counting highlights until it encounters a line without one
- allow_authed: When set to 1 it will let logged-in users bypass the checks
- allow_accessmode: Must be one of vhoaq (or omitted entirely for no exemptions [the default]), exempts everyone with at minimum the specified mode from highlight checks (e.g. a includes people with +q)
- percent: Threshold for the amount of characters belonging to highlights, not counting delimiters (e.g. "hi nick" would be 67%) -- works in conjunction with maxnicks
- show_opers_origmsg: Display the message that was dropped to opers with the SNO_EYES snomask set
Also added by k4be is a channel mode +H to exempt a channel from all mass highlight checks. This can be useful for quiz channels. He also excluded duplicate nicks on the same line from counting towards the total highlight count.