Give this a try. It makes the nicks random colors. Also, each instance of the nick in the text will be colored differently.

$_strip will remove any common symbols/punctuation except for those that are allowed in nicks. (e.g: ` [ ] { } etc)

Edit: Fixed case matching.

Code:
alias _strip return $remove($1,$chr(33),$chr(34),$chr(35),$chr(36),$chr(37),$chr(38),$chr(39),$chr(40),$chr(41),$chr(42),$chr(43),$chr(44),$chr(46),$chr(47),$chr(58),$chr(59),$chr(60),$chr(61),$chr(62),$chr(63),$chr(64))

alias getnicks {
  if ($active ischan) {
    var %i = 1, %n = $nick($active,0)
    while (%i <= %n) {
      set %n2 %n2 $nick($active,%i)
      inc %i
    }
  }
}

alias clrnick {
  var %i = 1, %t = $_strip($1-), %n = $numtok($1-,32), %nick
  getnicks
  while (%i <= %n) {
    if ($istok(%n2,$gettok(%t,%i,32),32)) {
      %nick = $gettok(%n2,$findtok(%n2,$gettok(%t,%i,32),32),32)
      %t = $reptok(%t,$gettok(%t,%i,32),$rc(%nick),32))
    }
    inc %i
  }
  unset %n2
  return %t
}

alias rc {
  var %r, %t
  var %t2 = $1, %l = $len($1), %i = 1
  while (%i <= %l) {
    %r = $r(0,15)
    if (%r < 10) { %r = 0 $+ %r }
    %t = $+(%t,,%r,$mid(%t2,%i,1))
    inc %i
  }
  %t = $+(%t,)
  return %t
}

Last edited by schaefer31; 03/03/06 11:55 PM.