Originally Posted By: RusselB
Code:
on ^*:text:*:#:{
  haltdef
  color $chan $nick $1-
}
alias -l color {
  var %color = $left($nick($1,$2).pnick,1)
  %color = $replace(%color,~,4,&,3,@,2,+,1)
  if %color !isnum {    %color = $color(normal)  }
  echo %color $2 $3-
}


You're using your own alias $color, and you are using mIRC's default $color identifier, or at least trying to. Sounds like asking for problems. Why not make use of the address book?

Code:
on $^&*:text:/(.*)/:#: {
  echo $nick($chan, $nick).color -bfilmt $chan $+(<, $left($remove($nick($chan, $nick).pnick, $nick), 1), $nick, >) $regml(1)
  haltdef
}


That applies the color of the nickname from the address book to the entire line. So if you gave @, +, etc, individual colors in the address book, then all their lines will have those colors. Does not apply to your own text, but you can specify your own color with Alt-K.

EDIT: It will eat spaces, though. If you want to keep something that looks like spaces, replace "$regml($1)" by:
Code:
$+($replace($left($regml($1), 1), $chr(32), $chr(160)), $replace($right($regml($1), -1), $+($chr(32), $chr(32)) $+($chr(160), $chr(32))))

Last edited by Thels; 08/09/10 11:24 AM.