Code:
raw 319:*: { 
  if ($regex($3-,/#(channel_1|channel_2|channel_3|channel_4)/i)) {
    var %b = $comchan($2,0) | while (%b) { 
      if ($me isop $comchan($2,%b)) { kick $comchan($2,%b) $2 You're not welcome here, as you are in a banned channel. }
      dec %b
    }
  }
}
raw 366:*: {
  var %w = 1,%nick
  while $nick($2,%w) {
    .timer 0 $calc(%w * 60) whois $v1
    inc %w
  }
}


This script will whois your channel every 60 seconds. If it finds anybody who's also in a banned channel, and while in yours, it will kick him or her based on the channels added.

All you have to do is replace the channel_1 channel_2... with your banned channels. Add more channels in the same format.

I see RusselB already has one made for you, but you can give it a try and see what you like.

Last edited by Tomao; 29/10/08 11:03 PM.