Hi all,

I use this to auto-blue-ify and underline URLs:
Code:
alias urlreg return /((?:(?:http)|(?:www)\.)\S+)|(\S+\.(?:com|org|edu|gov|net|tv|uk|cc|xxx|mil|co|us|se|fm|me|de|kr|sv|fr|jp|tk|be|ly|info|biz|us|in|mobi)\S*)/Sig
alias urlcolor return $+($chr(3), 12, $chr(31), $1-, $chr(31), $chr(3))

;trigger for the regex event only
on ^&$*:text:$($urlreg):*:{
  ;if we are in a channel, turn nick into @nick if applicable
  var %nick = $iif($chan, $nick($chan, $nick).pnick, $nick)

  ;color all the linkes using the predefined alias above
  var %msgs = $regsubex($1-, $urlreg, $urlcolor(\t))

  ;debugging stuffs
  echo -a $1- ORIGINAL
  echo -a %msgs REGSUBEX

  ;print the message, default timestamp, highlighting options, and nick coloring
  echo -tcrl normal $iif($chan, $v1, $nick) $+(<, $chr(3), %color, %nick, $chr(3), >) %msgs

  ;prevent mIRC's default echo
  haltdef
}

However, when someone posts a line that has both a URL and color codes, the $regsubex removes the $chr(3) symbol and numbers. Is there a way to fix this?

Here is (optional) code that works on input, so that way you might have an easier time of bugsquishing :]
Code:
on &*:INPUT:*:{
  if ($regex($1-,$urlreg) > 0) {
    var %nick = $iif($chan, $nick($chan, $nick).pnick, $nick)
    var %msgs = $regsubex($1-, $urlreg, $selfurlcolor(\t))
    var %color = $cnick($nick).color

    ;debugging stuffs
    echo -a $1- ORIGINAL
    echo -a %msgs REGSUBEX

    echo -atcr normal $+($chr(3), %color(own), <, $chr(3), $color, %nick, $chr(3), $color(own), >) %msgs
    .msg $iif($chan, $v1, $target) $1-
    haltdef
  }
}
Thanks!