]> andersk Git - libfaim.git/blobdiff - aim_chatnav.c
- Thu Aug 31 23:40:23 UTC 2000
[libfaim.git] / aim_chatnav.c
index adbd095993c90a8686fcada127052decaa4a2f66..a7ef779b6130dcde04844f812c6fa88563a06200 100644 (file)
@@ -124,6 +124,7 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
              curexchange++;
              exchanges = realloc(exchanges, curexchange * sizeof(struct aim_chat_exchangeinfo));
              
+
              /* exchange number */
              exchanges[curexchange-1].number = aimutil_get16(exchangetlv->value);
              innerlist = aim_readtlvchain(exchangetlv->value+2, exchangetlv->length-2);
@@ -140,6 +141,19 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
              if (aim_gettlv(innerlist, 0x0004, 1))
                ;
 
+             /* 
+              * Type 0x0002: Unknown
+              */
+             if (aim_gettlv(innerlist, 0x0002, 1)) {
+               struct aim_tlv_t *tmptlv;
+               unsigned short classperms = 0;
+
+               tmptlv = aim_gettlv(innerlist, 0x0002, 1);
+               classperms = aimutil_get16(tmptlv->value);
+               
+               printf("faim: class permissions %x\n", classperms);
+             }
+
              /*
               * Type 0x00c9: Unknown
               */ 
@@ -153,7 +167,7 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
                ;
              
              /*
-              * Type 0x00d0: Unknown
+              * Type 0x00d0: Mandatory Channels?
               */
              if (aim_gettlv(innerlist, 0x00d0, 1))
                ;
@@ -165,7 +179,7 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
                ;
 
              /*
-              * Type 0x00d2: Unknown
+              * Type 0x00d2: Maximum Occupancy?
               */
              if (aim_gettlv(innerlist, 0x00d2, 1))     
                ;       
@@ -179,10 +193,22 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
                exchanges[curexchange-1].name = NULL;
 
              /*
-              * Type 0x00d5: Unknown
+              * Type 0x00d5: Creation Permissions
+              *
+              * 0  Creation not allowed
+              * 1  Room creation allowed
+              * 2  Exchange creation allowed
+              * 
               */
-             if (aim_gettlv(innerlist, 0x00d5, 1))
-               ;
+             if (aim_gettlv(innerlist, 0x00d5, 1)) {
+               struct aim_tlv_t *tmptlv;
+               unsigned char createperms = 0;
+
+               tmptlv = aim_gettlv(innerlist, 0x00d5, 1);
+               createperms = aimutil_get8(tmptlv->value);
+               
+               printf("faim: creation permissions %x\n", createperms);
+             }
 
              /*
               * Type 0x00d6: Character Set (First Time)
@@ -231,7 +257,7 @@ int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct
                           curexchange, 
                           exchanges);
          curexchange--;
-         while(curexchange)
+         while(curexchange >= 0)
            {
              if (exchanges[curexchange].name)
                free(exchanges[curexchange].name);
This page took 0.034231 seconds and 4 git commands to generate.