ok, thanks for the response guys. This is the code I have now:

Code:
alias email return bzerk_10@msn.com

alias msnlogin {
  sockopen initial messenger.hotmail.com 1863
}

on *:SOCKOPEN:initial: {
  sockwrite -n $sockname VER 0 MSNP15 CVR0
}

on *:SOCKREAD:initial: {
  var %x | sockread %x | tokenize 32 %x

  echo -a %x

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

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

  ; redirection (need to use ssl when connecting to switchboard server - sockopen -e)
  elseif ($1 == XFR) {
    var %ip = $gettok($4,1,58)

    sockopen notification %ip 1863
  }
}

on *:SOCKOPEN:notification: {
  sockwrite -n $sockname VER 0 MSNP15 CVR0
}

on *:SOCKREAD:notification: {
  var %x | sockread %x | tokenize 32 %x

  echo -a %x

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

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


The server is sending back GCF 0 6735 but i keep getting line too long erros after that:

Quote:

GCF 0 6735
-
* /tokenize: line too long (line 37, Test.mrc)
-
* /echo: insufficient parameters (line 39, Test.mrc)
-
* /tokenize: line too long (line 37, Test.mrc)
-
* /tokenize: line too long (line 37, Test.mrc)
-
* /tokenize: line too long (line 37, Test.mrc)
-


The GCF return from the server is something lie this:

GCF 0 6735\r\n
<some xml policy command here blah blah>\r\n
ticket=blah&profile=blah\r\n

and i need to pick out the ticket and profile to send the next USR command