I came up with this but its not working, i want it to color the nicks in all channels and i want it to check all channels i am on in one go, i tried something but its now working, could someone please help me with this. I have pasted my code below.


Code:
alias away.chk {
  if ($1 !ischan) { who $1 | return }
  var %i = 1,%c = 1
  while $chan(%c) {
    while $nick(%chan,%i) { 
      %user = $ifmatch
      $iif($hfind($+(away,$network),%user),com.cline,cline-r) %user
      inc %i 
    }
    inc %c
    if $hget($+(away,$network)) { .hfree $+(away,$network) } | hmake $+(away,$network) 5
    who +aM
  }
}
alias -l com.cline {
  var %i 1
  while ($comchan($1,%i)) { cline -lm 14 $1 $ifmatch | inc %i }
}