Code:
on *:quit:{
  var %i = 1
  while $comchan($nick,%i) {
    echo 9 -tir $ifmatch * $nick ( $+ $address $+ ) has left IRC ( $+ $1-  $+ ).
    inc %i
  }
}