- /*
- * Type = 0x0004: Idle time.
- *
- * Number of seconds since the user
- * actively used the service.
- */
- case 0x0004:
- outinfo->idletime = aimutil_get16(&buf[i+4]);
- break;
+ /*
+ * Type = 0x0001: User flags
+ *
+ * Specified as any of the following bitwise ORed together:
+ * 0x0001 Trial (user less than 60days)
+ * 0x0002 Unknown bit 2
+ * 0x0004 AOL Main Service user
+ * 0x0008 Unknown bit 4
+ * 0x0010 Free (AIM) user
+ * 0x0020 Away
+ *
+ * In some odd cases, we can end up with more
+ * than one of these. We only want the first,
+ * as the others may not be something we want.
+ *
+ */
+ case 0x0001:
+ if (tlv1) /* use only the first */
+ break;
+ outinfo->flags = aimutil_get16(&buf[i+4]);
+ tlv1++;
+ break;
+
+ /*
+ * Type = 0x0002: Member-Since date.
+ *
+ * The time/date that the user originally
+ * registered for the service, stored in
+ * time_t format
+ */
+ case 0x0002:
+ outinfo->membersince = aimutil_get32(&buf[i+4]);
+ break;
+
+ /*
+ * Type = 0x0003: On-Since date.
+ *
+ * The time/date that the user started
+ * their current session, stored in time_t
+ * format.
+ */
+ case 0x0003:
+ outinfo->onlinesince = aimutil_get32(&buf[i+4]);
+ break;
+
+ /*
+ * Type = 0x0004: Idle time.
+ *
+ * Number of seconds since the user
+ * actively used the service.
+ */
+ case 0x0004:
+ outinfo->idletime = aimutil_get16(&buf[i+4]);
+ break;
+
+ /*
+ * Type = 0x0006: ICQ Online Status
+ *
+ * ICQ's Away/DND/etc "enriched" status
+ * Some decoding of values done by Scott <darkagl@pcnet.com>
+ */
+ case 0x0006:
+ outinfo->icqinfo.status = aimutil_get16(buf+i+2+2+2);
+ break;