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);
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
*/
;
/*
- * Type 0x00d0: Unknown
+ * Type 0x00d0: Mandatory Channels?
*/
if (aim_gettlv(innerlist, 0x00d0, 1))
;
;
/*
- * Type 0x00d2: Unknown
+ * Type 0x00d2: Maximum Occupancy?
*/
if (aim_gettlv(innerlist, 0x00d2, 1))
;
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)
curexchange,
exchanges);
curexchange--;
- while(curexchange)
+ while(curexchange >= 0)
{
if (exchanges[curexchange].name)
free(exchanges[curexchange].name);