;Colorbar - changes the nicks colors
;make sure you change the %my_bots variable and add your bots :>

alias colorbar {
  set %my_bots bot1 bot2 bot3 bot4 ...
  set %total $nick($1,0)
  set %i 1
  :loop
  ;echo -a %i - %total - $1
  if (%i > %total) { goto end }
  if ($nick($1,%i) isop $1) { 
    if ($nick($1,%i) isin %my_bots) { cline 7 $1 $nick($1,%i) | inc %i | goto loop }
    if ($nick($1,%i) == stocks) { cline 8 $1 $nick($1,%i) | inc %i | goto loop }
    else { goto op }
  }
  if ($nick($1,%i) isvo $1) && ($nick($1,%i) == $nick($1,1,v,o)) { goto voice }
  if ($nick($1,%i) isvo $1) { goto voice }
  if ($nick($1,%i) == $me) { inc %i | goto loop }
  else { goto end }
  :op
  cline 9 $1 $nick($1,%i)
  inc %i
  goto loop
  :voice 
  cline 11 $1 $nick($1,%i)
  inc %i
  goto loop
  :regular
  cline 15 $1 $nick($1,%i) 
  inc %i
  goto loop 
  :end
  cline 4 $1 $me

}

raw 366:*:{
  colorbar $2
}
on *:serverop:#: colorbar #
on *:op:#:{
  colorbar #
}
on *:deop:#:{
  cline 13 # $opnick
  colorbar #
}
on *:voice:#:{
  colorbar #
}
on *:devoice:#:{
  cline 15 # $vnick
  colorbar #
}
