Just to shorten down and speed up the quit part:
Code:
on ^*:quit: {
  var %x = 1,%m $nick ( $+ $address $+ ) Quit ( $+ $iif($1-,$1-,Quit) $+ ),%c #channel1 #channel2
  while ($comchan($nick,%x)) {
    if (!$istok(%c,$v1,32)) echo $color(quit) -t $comchan($nick,%x) * %m
    inc %x
  }
  haltdef
}