X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/blobdiff_plain/dad2e69631631c1fc2b942439de1c6d5d1de5ae5..9797852cb1854c00f6d3caffb5a21b500fafe9bd:/aim_chatnav.c diff --git a/aim_chatnav.c b/aim_chatnav.c index adbd095..a7ef779 100644 --- a/aim_chatnav.c +++ b/aim_chatnav.c @@ -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);