This script consists of an alias which checks how many nicks were mentioned during a message in a channel, and a small on text which uses this to ban the person if it exceeds 5.
To load this script simply drop it into a blank remotes file.
You may also just want to take the alias and tie it into a previous script.
on *:TEXT:*:#: {
if (($nick !isop $chan) && ($me isop $chan)) {
if ($mhighlightcheck($chan,$1-) > 5) {
ban -k $chan $nick 3 [AutoKick] Mass Highlight.
}
}
}
alias mhighlightcheck {
;$1 chan
;$2 text
;returns number of highlighted nicks
;
var %count = 0, %x = 1, %text = $replace($strip($2-),$chr(44),$chr(32))
while ($numtok(%text,32) > 0) {
if ($gettok(%text,%x,32) ison $1) {
inc %count
}
else {
}
var %text $remtok(%text,$v1,0,32)
}
return %count
}