This is something I made to help someone else. Basically, you shift click the link to add it to your (mIRC's builtin) URL list.
on ^$*:hotlink:/[^[:alnum:]]*(?:((http|ftp)\x3A\x2F{2}\S+)|(www\.\S+\.\S+))/i:*:{ }
on $*:hotlink:/[^[:alnum:]]*(?:((http|ftp)\x3A\x2F{2}\S+)|(www\.\S+\.\S+))/i:*:{
if ($mouse.key & 4) {
url -i @ $regml(1)
echo -ag Url Added: $regml(1)
return
}
run $1-
}
This will match any URL starting with http://, ftp://, or www.*.* (as in, www DOT something DOT (has to be two dots in there.)
As far as recognizing addresses go.. That's a lot tougher.
As it's hard to tell what is and isn't a link. It would take a lot more regex then it's worth. But, for examples sake, you could be cheap and just do this:
on ^$*:hotlink:/[^[:alnum:]]*(?:((http|ftp)\x3A\x2F{2}\S+)|(www\.\S+\.\S+)|(\S+\.(?:com|org|net|biz|us|ru)\S*))/i:*:{ }
on $*:hotlink:/[^[:alnum:]]*(?:((http|ftp)\x3A\x2F{2}\S+)|(www\.\S+\.\S+)|(\S+\.(?:com|org|net|biz|us|ru)\S*))/i:*:{
if ($mouse.key & 4) {
url -i @ $regml(1)
echo -ag Url Added: $regml(1)
return
}
run $1-
}
This should recognize anything that has a .com / .net / .org / .ru / .biz / .us in it. Though it's never guaranteed that they are infact links.
But that should do what you need.
Just remember, the example above requires you to hold shift, and double click the link to get it to add it to the URL list. Otherwise if you just double click it, it'll open the link in your browser.