This is a forum request. The requester wants to be able to specify any keyword in his shortened URL. I thought I'd submit this as a snippet to share with you all nice folks. It uses a url shortening service called weba.im.> !shorten http://www.hawkee.com hawkee
Shortened URL: **http://weba.im/hawkee**- Added an shorten alias where you can initiate a self-trigger. ```mirc on *:sockopen:short*:{ tokenize 124 $sock($sockname).mark if ($sockerr) { msg $2 Connection Related Error! | return } var %- $sockname | $4 %- GET $1 HTTP/1.0 | $4 %- Connection: close $4 %- Host: $+(weba.im,$str($crlf,2)) } on $*:text:/^[!@.]shorten( |$)/iS:*: .ignore -cpu2 $nick 2 | $shorten($strip($2-3)) alias shorten { if ($me ison #) { tokenize 32 $strip($1-) | var %n = $iif(!$isid,$me,$nick) var %l = /(?<=^| )((?>\S{3,6}:\/\/|w{3}\056)\S+)/iS if (!$1) { .notice %n ERROR: Please supply a link to shorten! } elseif (!$regex($1,%l)) { .notice %n ERROR: $1 is not a valid link! } elseif (!$2) { .notice %n ERROR: Please include a custom keyword! } else { var %s short $+ $+($site,$ticks,$network) | sockopen %s weba.im 80 sockmark %s $+($+(/api.php?action=shorturl&url=,$iif(http:// isin $1,$& $+ $1,$+($v1,$1)),&keyword=,$2,&format=xml),|,#,|,%n,|,sockwrite -nt,|,$2) } } } on *:sockread:short*:{ tokenize 124 $sock($sockname).mark if ($sockerr) { msg $2 Reading Related Error! | return } | sockread &short if (*already exists* iswm $bvar(&short,1-).text) msg $iif($2,$2,$3) Shortened URL: $& $+($chr(2),$+(http://weba.im/,$5)) | return | msg $iif($2,$2,$3) Shortened URL: $& $iif($regex($v2,/(.*)<\/shorturl>/),$+($chr(2),$regml(1))) } ```