Not sure if this would work, what we need to do is when someone parts/quits etc to remove their nickname from the hash table providing their not in any more channels with you.

I used the method $calc($comchan($nick,0) - 1) because then they part the channel I did a little snippet to echo the common channels and it still said one. So I did a little $calc() to subtract 1 from the total to see if it was 0.

I could be wrong and there could be more simplistic ways to do it but it works for me thus far.

Code:
On *:Join:#: {
  if ($nick == $me) { who $chan }
  who $nick 
}

On *:Kick:#: {
  if ($hget(ircops,$knick)) {
    if ($calc($comchan($knick,0) - 1) == 0) { hdel ircops $knick }
  }
}

On *:Part:#: {
  if ($hget(ircops,$nick)) {
    if ($calc($comchan($nick,0) - 1) == 0) { hdel ircops $nick }
  }
}

On *:Quit: {
  if ($hget(ircops,$nick)) hdel ircops $nick
}

alias nickLUST {
  if ($1 == color) {
    var %x = $hget(ircops,0).item
    while (%x) {
      if ($3 == $hget(ircops,%x).item) return $rgb(0,255,255)
      dec %x
    }
    return USE_DEFAULT
  }
}

Raw 352:*: {
  if (* isin $7) { 
    hadd -m ircops $6 $6
  }
}