Took me a while to find this again but I got there in the end:
alias url.find {
var %n = $wildtok($1-,http*,0,32), %i = 1, %e = $1-
while (%n >= %i) {
var %x = $wildtok(%e,http*,%i,32)
var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$left(%e,1) $+ $left(%e,2),$null)
var %e = $replace(%e,%x,%y)
inc %i
}
var %n = $wildtok(%e,www.*,0,32), %i = 1
while (%n >= %i) {
var %x = $wildtok(%e,www.*,%i,32)
var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$+ $left(%e,1) $+ $left(%e,2),$null)
var %e = $replace(%e,%x,%y)
inc %i
}
return %e
}
Hope this helps; it will colour the links and (if memory serves) retain the original formatting of the text.
You would use it in a similar way to this:
on *:text:*:#:{ echo -a $url.find($1-) }