mIRC Homepage
Posted By: Damsulegna sockets - 05/02/07 10:59 AM
Hi all,

I currently utilise an Auto update script, which checks my HOST and downloads \ bwrites the newer .mrc file and reloads accordingly.

What i cant prevent, it the writing of this into the NEWER file
HTTP/1.1 200 OK
Age: 2012
Accept-Ranges: bytes
Date: Mon, 05 Feb 2007 09:08:07 GMT
Content-Length: 25600
Content-Type: application/octet-stream
Server: HTTP Daemon
Last-Modified: Mon, 05 Feb 2007 00:47:03 GMT
ETag: "b9c1f3-6400-8276fc0"

Any ideas how to discard everything up to the first empty line and then write anything that follows.

Any help would be appreciated.


P.S I have not pasted all my code in case it is a common occurance.
Posted By: Damsulegna Re: sockets - 05/02/07 12:17 PM
Sorry, found the resolve

on *:sockread:UpDaMsGeTdAmS:{
  if ($sockerr) return
  if (!$sock($sockname).mark) {
    var %tmp
    sockread %tmp
    if (* !iswm %tmp) sockmark $sockname 1
  else {
    sockread &Data
    while ($sockbr) {
      .bwrite temp/ $+ %UpDaMs_b -1 $ifmatch &Data
      sockread &Data

!$sock($sockname).mark was the key, in depth searching found answer

thanks anyway.
© mIRC Discussion Forums