0 LIKES
Snippet
URL with highlighted text by Matt5150
In Category General IRC Posted by Snippets On 12/06/23
Usage: $d.url(text text text https://www.google.it/ text)
Return: alt text
Return: alt text
alias d.url {
var %:text = $1-
if ($regex(%:text,/(\b(www.?\.|https?:\/\/|ftp:\/\/).)/i)) {
var %a = 1
while (%a <= $numtok(%:text,32)) {
if ($regex($gettok(%:text,%a,32),/(\b(www.?\.|https?:\/\/|ftp:\/\/).)/i)) {
var %b = $+($chr(3),12,$chr(31),$gettok(%:text,%a,32),$chr(31),$chr(3))
var %:text = $puttok(%:text,%b,%a,32)
}
inc %a
}
}
return %:text
}
Comments 0
You must be logged in to comment.





