ok, that being said, an effective way would be to:
1) Use a script matching the TEXT they're saying
2) make the channel +m so nobody without a voice (the little + next to their name) can talk
Ultimately, check all the addresses and see if there is SOMETHING in common, an identd perhaps. A single ban catching 40 people is better than a script any day

Script example:
on @*:text:M-RuLerS:#channel-name:ban $nick 2 | kick #channel-name $nick Reason
Yes, I know the ban and kick can go in the same command instead of two, Im jsut using that example. Replace #channel-name with your channel's name