i use
raw 319:*:{
echo -a 4 $+ $2 5is in channels4 $3-
halt
}
as part of my auto whois. you could do something like
raw 319:*:{
if #badchannel isin $3- { kick $2 }
}
of course you would need to whois each nick on join and set channels that are bad, but i think this is the basis of what you ultimately want to do.
Good Luck