From 25aaf30ee37131abc727b1fd86b08a27e415db98 Mon Sep 17 00:00:00 2001 From: mid Date: Thu, 20 Sep 2001 01:54:15 +0000 Subject: [PATCH] - Wed Sep 19 18:50:34 PDT 2001 - Remove non-standard default features from aim_send_im_ext. - Sadly, AOL 5.0 ignores messages with non-standard features. Once AOL releases AOL 6 for the Macintosh, there will no longer be any reason for anyone to use AOL 5, and this will be a non-issue. - Check for 0x2711 TLV in buddy icons. This is weird. - Add AIM_IMFLAG_ACTIVEBUDDY. - Fix ICQ login. (Oops.) --- BUGS | 6 ++++++ CHANGES | 9 +++++++++ include/aim.h | 4 ++++ src/buddylist.c | 2 +- src/im.c | 5 +++-- src/info.c | 3 ++- src/login.c | 4 ++-- utils/faimtest/faimtest.c | 4 ++++ 8 files changed, 31 insertions(+), 6 deletions(-) diff --git a/BUGS b/BUGS index 548930d..9ac1520 100644 --- a/BUGS +++ b/BUGS @@ -3,6 +3,12 @@ aim.h ----- - Needs a bit of cleaning +info.c +------ + - aim_userinfo_s isn't real good. There is no way to tell the client + which fields are present and which are zero because they weren't + provided. + search.c ------------ - Still need aim_usersearch_name() diff --git a/CHANGES b/CHANGES index b8178e9..7057e7e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,15 @@ No release numbers ------------------ + - Wed Sep 19 18:50:34 PDT 2001 + - Remove non-standard default features from aim_send_im_ext. + - Sadly, AOL 5.0 ignores messages with non-standard features. Once + AOL releases AOL 6 for the Macintosh, there will no longer be any + reason for anyone to use AOL 5, and this will be a non-issue. + - Check for 0x2711 TLV in buddy icons. This is weird. + - Add AIM_IMFLAG_ACTIVEBUDDY. + - Fix ICQ login. (Oops.) + - Tue Sep 11 16:41:11 PDT 2001 - Fix chat invites. - Keep faimtest from passing va_list's. That scares me. diff --git a/include/aim.h b/include/aim.h index 32fa713..91111dd 100644 --- a/include/aim.h +++ b/include/aim.h @@ -399,6 +399,10 @@ struct aim_userinfo_s { #define AIM_FLAG_AWAY 0x0020 #define AIM_FLAG_UNKNOWN40 0x0040 #define AIM_FLAG_UNKNOWN80 0x0080 +#define AIM_FLAG_UNKNOWN100 0x0100 +#define AIM_FLAG_UNKNOWN200 0x0200 +#define AIM_FLAG_ACTIVEBUDDY 0x0400 +#define AIM_FLAG_UNKNOWN800 0x0800 #define AIM_FLAG_ALLUSERS 0x001f diff --git a/src/buddylist.c b/src/buddylist.c index 975fccf..c809576 100644 --- a/src/buddylist.c +++ b/src/buddylist.c @@ -127,7 +127,7 @@ faim_export int aim_remove_buddy(aim_session_t *sess, aim_conn_t *conn, const ch if (!sn || !strlen(sn)) return -EINVAL; - if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x0002, 10+1+strlen(sn)))) + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+1+strlen(sn)))) return -ENOMEM; snacid = aim_cachesnac(sess, 0x0003, 0x0005, 0x0000, sn, strlen(sn)+1); diff --git a/src/im.c b/src/im.c index 4a604d8..84454b5 100644 --- a/src/im.c +++ b/src/im.c @@ -145,7 +145,7 @@ faim_export fu32_t aim_iconsum(const fu8_t *buf, int buflen) faim_export int aim_send_im_ext(aim_session_t *sess, aim_conn_t *conn, struct aim_sendimext_args *args) { static const fu8_t deffeatures[] = { - 0x01, 0x01, 0x01, 0x02, 0x42, + 0x01, 0x01, 0x01, 0x02 }; int i, msgtlvlen; aim_frame_t *fr; @@ -962,7 +962,8 @@ static int incomingim_ch2_buddyicon(aim_session_t *sess, aim_module_t *mod, aim_ aim_tlv_t *miscinfo; aim_bstream_t tbs; - miscinfo = aim_gettlv(list2, 0x2711, 1); + if (!(miscinfo = aim_gettlv(list2, 0x2711, 1))) + return 0; aim_bstream_init(&tbs, miscinfo->value, miscinfo->length); args->info.icon.checksum = aimbs_get32(&tbs); diff --git a/src/info.c b/src/info.c index 5ae956d..99330b5 100644 --- a/src/info.c +++ b/src/info.c @@ -210,6 +210,7 @@ faim_internal int aim_extractuserinfo(aim_session_t *sess, aim_bstream_t *bs, st * 0x0008 Unknown bit 4 * 0x0010 Free (AIM) user * 0x0020 Away + * 0x0400 ActiveBuddy * */ outinfo->flags = aimbs_get16(bs); @@ -444,7 +445,7 @@ faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char * Normally contains: * t(0001) - short containing max profile length (value = 1024) * t(0002) - short - unknown (value = 16) [max MIME type length?] - * t(0003) - short - unknown (value = 7) + * t(0003) - short - unknown (value = 10) */ static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { diff --git a/src/login.c b/src/login.c index 4cce808..809958b 100644 --- a/src/login.c +++ b/src/login.c @@ -82,7 +82,6 @@ static int goddamnicq(aim_session_t *sess, aim_conn_t *conn, const char *sn) * valid, a 0017/0007 comes back, which is the signal to send it the main * login command (0017/0002). * - * XXX make ICQ logins work again. */ faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn) { @@ -93,7 +92,7 @@ faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const c if (!sess || !conn || !sn) return -EINVAL; - if ((sn[0] >= '0') || (sn[0] <= '9')) + if ((sn[0] >= '0') && (sn[0] <= '9')) return goddamnicq(sess, conn, sn); sess->flags |= AIM_SESS_FLAGS_SNACLOGIN; @@ -757,6 +756,7 @@ static int motd(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_mod * 2 Advisory upgrade * 3 System bulletin * 4 Nothing's wrong ("top o the world" -- normal) + * 5 Lets-break-something. * */ id = aimbs_get16(bs); diff --git a/utils/faimtest/faimtest.c b/utils/faimtest/faimtest.c index f5b8e27..45367aa 100644 --- a/utils/faimtest/faimtest.c +++ b/utils/faimtest/faimtest.c @@ -913,6 +913,7 @@ static int faimtest_memrequest(aim_session_t *sess, aim_frame_t *fr, ...) static void printuserflags(fu16_t flags) { + if (flags & AIM_FLAG_UNCONFIRMED) dinlineprintf("UNCONFIRMED "); if (flags & AIM_FLAG_ADMINISTRATOR) @@ -929,6 +930,9 @@ static void printuserflags(fu16_t flags) dinlineprintf("ICQ? "); if (flags & AIM_FLAG_UNKNOWN80) dinlineprintf("UNKNOWN80 "); + if (flags & AIM_FLAG_ACTIVEBUDDY) + dinlineprintf("ACTIVEBUDDY "); + return; } -- 2.45.1