You didn't do what I said:

Code:
  elseif ($1 == XFR) {
    var %ip = $gettok($4,1,58)

    sockopen notification %ip 1863
  }


Should be:

Code:
  elseif ($1 == XFR) {
    var %ip = $gettok($4,1,58), %port = $gettok($4,2,58)

    sockopen notification %ip %port
  }


MSN can and have been known to change the ports before, so I would advise you use the port the server tells you to use and not a hardcoded one.

As for your new problem, as soon as you receive the GCF response you need to start reading data into a binary variable, like this:

Code:
elseif ($1 == GCF) {
  sockread -f $3 &data
  var %start = $calc($bfind(&data,1,ticket=) + 7), %end = $calc($bfind(&data,%start,&profile=) - 1), %ticket = $bvar(&data,$+(%start,-,%end)).text
  var %start = $calc($bfind(&data,1,&profile=) + 9), %end = $calc($bfind(&data,%start,$crlf) - 1), %profile = $bvar(&data,$+(%start,-,%end)).text
  ; Do whatever you need to with %ticket and %profile here.
}


I'm not too sure how long the ticket and profile data is going to be, so you might still get line too long errors. If you do let me know and I'll try to make a full binary variable solution instead.

Also, general tip, when working with MSNPxx protocols it's important to make sure you always get the right TRiD when communicating with the server otherwise you will be disconnected. Use this alias to make sure you always have an accurate TRiD:

Code:
alias trid {
  inc %msn. $+ $1
  return $($+(%,msn.,$1),2)
}


Then you would use it like this:

Code:
  if ($1 $3 == VER MSNP15) {
    sockwrite -n $sockname CVR $trid($sockname) 0x0409 winnt 5.1 i386 MSNMSGR 8.0.0328 msmsgs bzerk_10@msn.com   
  }

  elseif ($1 == CVR) {
    sockwrite -n $sockname USR $trid($sockname) TWN I bzerk_10@msn.com
  }


Then just make sure you unset the variables when the sockets are closed:

Code:
on *:sockclose:*:{
  if ($istok(initial notification,$sockname,32)) unset %msn. $+ $sockname
}