this
if ($sockerr) msg %tchan $sockerr
will only return a number... if you want to send something more specifically
try $sock($sockname).wsmsg
.wsmsg returns the last winsock error message match the error number
from the help file
by the way, if you used regex on it, this is a tip
this
on *:SOCKREAD:turl:{
if ($sockerr) msg %tchan $sockerr
var %turl | sockread %turl
var %a = copy('http://tinyurl.com/
var %b = ');
if (%a $+ * $+ %b iswm %turl) {
var %link = $remove(%turl,$left(%turl,6),$right(%turl,3))
if ($remove(%link,$left(%link,19)) != %alias) && (%alias) { msg %tchan This custom alias ( $+ %alias $+ ) is not available or is being used. You may try again by typing !tinyurl link alias.
msg %tchan Here is another link: %link
}
else { msg %tchan Here is the link: %link }
}
}
as Jethro_ said you could use sockmark instead
i will give you some examples using ur vars
on *:SOCKREAD:turl:{
if ($sockerr) msg %tchan $sockerr
var %turl,%y = /<blockquote><b>(.+)<\/b>/
sockread %turl
if $regex(%turl,%y) {
msg %tchan here is your link: $regml(1)
}
if (The custom alias isin %turl) {
msg %tchan The custom alias you've chosen is not available. We've created a random one for you
}
}
this will return, if the alias already exist, and then return another one