I found a tinyurl snippet that works by just typing /tinyurl <url>
But i decided to add one for long urls that are posted in a channel.
Problem is, if the url has normal text before or after it IE:
<nick> Check this site out <url>
<nick> <url> This site is good
It picks up the text and the url that returns is wrong, this is what i have
on ^1:TEXT:*:#root:{
var %input = $1-
if ( $regsub(%input,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g,\1\,%input) ) && ( ($len(%input) > 51) ) { /tinyurl %input }
haltdef
}
any help would be really great, thanks