make a hash table named badchans with for each bad channel an item with as name the channelname and as data the number 1
raw 319:*: {
  var %i = 1
  var %chanlist, %chan
  .!echo -q $regsub($gettok($3-,%i,32),^[^#&]*+,,%chan)
  while (%chan) {
    if ($hget(badchans,%chan)) {
      echo $color(whois)  -s bad chan detected: %chan
      var %chanlist = %chanlist $+(4,%chan,)
    else {
      var %chanlist = %chanlist %chan
    inc %i
    .!echo -q $regsub($gettok($3-,%i,32),^[^#&]*+,,%chan)
  echo $color(whois) -s $2 on %chanlist

(now it's tested smile )

Last edited by Kelder; 06/07/04 10:08 AM.