alias ifjava {
if (java isin $remove($left($address($1,0),$pos($address($1,0),@,1)),*!,@)) {
return $true
halt
}
return $false
}
on *:join:#channel: {
inc %cscan
if ($ifjava($nick)) { ban -k $chan $nick 9 JAVA users are not permitted to enter this channel }
if (%cscan > 50) {
echo -s 4Performing JAVA scan on $chan (automatically after 50 people join)
var %d = 1
while (%d <= $nick($chan,0)) {
if ($ifjava($nick($chan,%d)) {
inc %c
ban -k $chan $nick 9 JAVA users are not permitted to enter this channel
}
inc %d
}
echo -s Removed %c people from $+($chan,.)
echo -s -
unset %c
}
}