Code:
alias vcheck {
  sockclose vcheck
  sockopen vcheck www.mirc.com 80
}

on *:sockopen:vcheck:{
  if ($sockerr) { 
    echo -a ERROR $sock($sockname).wserr : $sock($sockname).wsmsg
    return
  }
  sockwrite -n $sockname GET /get.html HTTP/1.1
  sockwrite -n $sockname host: www.mirc.com $str($crlf,2)
}

on *:sockread:vcheck:{
  var %data
  sockread %data
  if (*the latest version is* iswm %data) {
    echo -a $replace(%data,<strong>,$chr(2),</strong>,$chr(2))
    sockclose $sockname
  }
}


In mIRC 6.35 (and presumably the next beta), the above code works. However, that contradicts the description of /sockwrite -n. In the above script, in 6.35, the /sockwrite command is adding a CRLF to the end of the line even though there's already two CRLFs at the end.

/sockwrite -n in the help file says:

Quote:
The -n switch appends a $crlf to the line being sent if it is not a &binvar and if it does not already have a $crlf.


In other words, if it does have a CRLF then mIRC shouldn't be adding one.