The way of keeping that from flooding out, is to put the raw response section into a group that is enabled just before you do the /who and disabled when raw 315 is returned.
Here's your code with that modification, and another suggestion regarding the clinecol alias
alias who-cline {
var %g = 1
while ($chan(0) >= %g) {
.enable #who-cline
who $chan(%g)
inc %g
}
}
#who-cline off
raw 352:*: {
if ($me !ison $2) { return }
elseif (* isin $7) { cline $clinecol(po) $2 $6 }
elseif ($6 isnotify) { cline $clinecol(no) $2 $6 }
elseif (G isin $7) { cline $clinecol(aw) $2 $6 }
halt
}
raw 315:*:{
.disable #who-cline
haltdef
}
alias clinecol {
return $iif($1 == po,05,$iif($1 == no,03,$iif($1 == aw,02)))
}
#who-cline end
Regarding getting that information from something other than /who, not that I'm aware of anything.