Here's a sample code based on Bekar's suggestion but with some small differences, it uses /fwrite (quicker) and /plays to an alias which parses the results, rather than parsing them as they arrive.
Note: It doesn't check for isnotify because /cnick can do that better/easier/quicker
†† than extra parsing with using cline.
Note: It doesn't check for chanmodes because /cnick can do that better/easier/quicker
†† than extra parsing with using cline.
alias who-cli {
if (%colornick_ != enabled) { return }
var %nr = $chan(0)
while (%nr > 0) {
.timer 1 $calc(%nr * 5) who $chan(%nr)
dec %nr
}
}
raw 352:*:{
if ($me !ison $2) { return }
if !$fopen($2) { .fopen -no $2 $2.who }
.fwrite -n $2 $3-
halt
}
raw 315:*:{
.fclose $2
.play -a who_cols_ $2 $2.who 100
.remove $2.who
halt
}
alias -l who_cols_ {
if ($me !ison $1) { return }
if ($5 !ison $1) { return }
var %a
if (G isin $6) { %a = $clinecol(aw) }
if (* isin $6) { %a = $clinecol(po) }
if %a { cline -l %a $1 $5 }
else cline -r $1 $5
}
†† Take your pick.