]> andersk Git - libfaim.git/blobdiff - aim_login.c
- Mon Feb 26 01:46:34 UTC 2001
[libfaim.git] / aim_login.c
index 4c4a2e6ff5ef22b03304c8405495b06b6fe5b207..10e1f792fd3a11fed166937bcbaf0e1d410ddde8 100644 (file)
@@ -5,6 +5,7 @@
  *
  */
 
+#define FAIM_INTERNAL
 #include <faim/aim.h>
 
 #include "md5.h"
@@ -199,7 +200,7 @@ faim_export int aim_send_login (struct aim_session_t *sess,
   
     curbyte += aim_puttlv_32(newpacket->data+curbyte, 0x0014, clientinfo->unknown);
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0009, 0x0015);
-    curbyte += aim_puttlv_8(newpacket->data+curbyte, 0x004a, 0x01);
+    curbyte += aim_puttlv_8(newpacket->data+curbyte, 0x004a, 0x00);
   } else {
     /* Use very specific version numbers, to further indicate the hack. */
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0016, 0x010a);
@@ -298,6 +299,10 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
   char *sn = NULL, *bosip = NULL, *errurl = NULL, *email = NULL;
   unsigned char *cookie = NULL;
   int errorcode = 0, regstatus = 0;
+  int latestbuild = 0, latestbetabuild = 0;
+  char *latestrelease = NULL, *latestbeta = NULL;
+  char *latestreleaseurl = NULL, *latestbetaurl = NULL;
+  char *latestreleaseinfo = NULL, *latestbetainfo = NULL;
 
   /*
    * Read block of TLVs.  All further data is derived
@@ -357,13 +362,43 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
   /*
    * The registration status.  (Not real sure what it means.)
    *   Not available for ICQ logins.
+   *
+   *   1 = No disclosure
+   *   2 = Limited disclosure
+   *   3 = Full disclosure
+   *
+   * This has to do with whether your email address is available
+   * to other users or not.  AFAIK, this feature is no longer used.
+   *
    */
   if (aim_gettlv(tlvlist, 0x0013, 1))
     regstatus = aim_gettlv16(tlvlist, 0x0013, 1);
 
+  if (aim_gettlv(tlvlist, 0x0040, 1))
+    latestbetabuild = aim_gettlv32(tlvlist, 0x0040, 1);
+  if (aim_gettlv(tlvlist, 0x0041, 1))
+    latestbetaurl = aim_gettlv_str(tlvlist, 0x0041, 1);
+  if (aim_gettlv(tlvlist, 0x0042, 1))
+    latestbetainfo = aim_gettlv_str(tlvlist, 0x0042, 1);
+  if (aim_gettlv(tlvlist, 0x0043, 1))
+    latestbeta = aim_gettlv_str(tlvlist, 0x0043, 1);
+  if (aim_gettlv(tlvlist, 0x0048, 1))
+    ; /* no idea what this is */
+
+  if (aim_gettlv(tlvlist, 0x0044, 1))
+    latestbuild = aim_gettlv32(tlvlist, 0x0044, 1);
+  if (aim_gettlv(tlvlist, 0x0045, 1))
+    latestreleaseurl = aim_gettlv_str(tlvlist, 0x0045, 1);
+  if (aim_gettlv(tlvlist, 0x0046, 1))
+    latestreleaseinfo = aim_gettlv_str(tlvlist, 0x0046, 1);
+  if (aim_gettlv(tlvlist, 0x0047, 1))
+    latestrelease = aim_gettlv_str(tlvlist, 0x0047, 1);
+  if (aim_gettlv(tlvlist, 0x0049, 1))
+    ; /* no idea what this is */
+
 
   if ((userfunc = aim_callhandler(command->conn, 0x0017, 0x0003)))
-    ret = userfunc(sess, command, sn, errorcode, errurl, regstatus, email, bosip, cookie);
+    ret = userfunc(sess, command, sn, errorcode, errurl, regstatus, email, bosip, cookie, latestrelease, latestbuild, latestreleaseurl, latestreleaseinfo, latestbeta, latestbetabuild, latestbetaurl, latestbetainfo);
 
 
   if (sn)
@@ -376,6 +411,19 @@ faim_internal int aim_authparse(struct aim_session_t *sess,
     free(email);
   if (cookie)
     free(cookie);
+  if (latestrelease)
+    free(latestrelease);
+  if (latestreleaseurl)
+    free(latestreleaseurl);
+  if (latestbeta)
+    free(latestbeta);
+  if (latestbetaurl)
+    free(latestbetaurl);
+  if (latestreleaseinfo)
+    free(latestreleaseinfo);
+  if (latestbetainfo)
+    free(latestbetainfo);
+
   aim_freetlvchain(&tlvlist);
 
   return ret;
This page took 0.03322 seconds and 4 git commands to generate.