Mercurial > pidgin.yaz
changeset 10560:33746d45bd0d
[gaim-migrate @ 11938]
Some stuff I have lying around in my tree. Shouldn't change any
functionality, mostly just notes to myself/anyone interested
in working on oscar.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 01 Feb 2005 03:52:46 +0000 |
parents | c354b70d8502 |
children | 1db4f49de0c6 |
files | src/protocols/oscar/ft.c src/protocols/oscar/icq.c src/protocols/oscar/oscar.c src/protocols/oscar/service.c |
diffstat | 4 files changed, 57 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/ft.c Mon Jan 31 14:36:26 2005 +0000 +++ b/src/protocols/oscar/ft.c Tue Feb 01 03:52:46 2005 +0000 @@ -384,7 +384,7 @@ /* end of hdr2 */ -#if 0 /* XXX - this is how you send buddy icon info... */ +#if 0 /* XXX - this is how you send buddy icon info... */ aimbs_put16(hdrbs, 0x0008); aimbs_put16(hdrbs, 0x000c); aimbs_put16(hdrbs, 0x0000);
--- a/src/protocols/oscar/icq.c Mon Jan 31 14:36:26 2005 +0000 +++ b/src/protocols/oscar/icq.c Tue Feb 01 03:52:46 2005 +0000 @@ -105,6 +105,45 @@ return 0; } +faim_export int aim_icq_setauthsetting(aim_session_t *sess, int auth_required) +{ + aim_conn_t *conn; + aim_frame_t *fr; + aim_snacid_t snacid; + int bslen; + + if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0015))) + return -EINVAL; + + bslen = 2+4+2+2+2+4; + + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4 + bslen))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0015, 0x0002, 0x0000, NULL, 0); + aim_putsnac(&fr->data, 0x0015, 0x0002, 0x0000, snacid); + + /* For simplicity, don't bother using a tlvlist */ + aimbs_put16(&fr->data, 0x0001); + aimbs_put16(&fr->data, bslen); + + aimbs_putle16(&fr->data, bslen - 2); + aimbs_putle32(&fr->data, atoi(sess->sn)); + aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */ + aimbs_putle16(&fr->data, snacid); /* eh. */ + aimbs_putle16(&fr->data, 0x0c3a); /* shrug. */ + aimbs_putle16(&fr->data, 0x02f8); + aimbs_putle16(&fr->data, 0x0001); + aimbs_putle8(&fr->data, auth_required); + aimbs_putle8(&fr->data, 0x0c); + aimbs_putle16(&fr->data, 0x0103); + aimbs_putle16(&fr->data, 0x0000); + + aim_tx_enqueue(sess, fr); + + return 0; +} + /** * Change your ICQ password. *
--- a/src/protocols/oscar/oscar.c Mon Jan 31 14:36:26 2005 +0000 +++ b/src/protocols/oscar/oscar.c Tue Feb 01 03:52:46 2005 +0000 @@ -4246,7 +4246,7 @@ if (destn == NULL) return 1; - + buf = g_strdup_printf(_("User information not available: %s"), (reason < msgerrreasonlen) ? _(msgerrreason[reason]) : _("Unknown reason.")); if (!gaim_conv_present_error(destn, gaim_connection_get_account((GaimConnection*)sess->aux_data), buf)) { g_free(buf); @@ -5814,6 +5814,7 @@ if (aim_sn_is_icq(gaim_account_get_username(account))) oscar_set_status_icq(account, status); else + /* QQQ - Should probably also set this for ICQ */ oscar_set_status_aim(account, status); } return;
--- a/src/protocols/oscar/service.c Mon Jan 31 14:36:26 2005 +0000 +++ b/src/protocols/oscar/service.c Tue Feb 01 03:52:46 2005 +0000 @@ -782,9 +782,16 @@ } /* - * Subtype 0x001e - Extended Status + * Subtype 0x001e - Set various account settings (mostly ICQ related). * - * Sets your ICQ status (available, away, do not disturb, etc.) + * These settings are transient, not server-stored (i.e. they only + * apply to this session, and must be re-set the next time you sign + * on). + * + * You can set your ICQ status (available, away, do not disturb, + * etc.), or whether your IP address should be hidden or not, or + * if your status is visible on ICQ web sites, and you can set + * your IP address info and what not. * * These are the same TLVs seen in user info. You can * also set 0x0008 and 0x000c. @@ -800,7 +807,7 @@ if (!sess || !(conn = aim_conn_findbygroup(sess, AIM_CB_FAM_MSG))) return -EINVAL; - data = AIM_ICQ_STATE_HIDEIP | AIM_ICQ_STATE_WEBAWARE | status; /* yay for error checking ;^) */ + data = AIM_ICQ_STATE_DIRECTREQUIREAUTH | AIM_ICQ_STATE_HIDEIP | AIM_ICQ_STATE_WEBAWARE | status; if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8))) return -ENOMEM; @@ -809,6 +816,11 @@ aim_putsnac(&fr->data, 0x0001, 0x001e, 0x0000, snacid); aim_tlvlist_add_32(&tl, 0x0006, data); +#if 0 + aim_tlvlist_add_raw(&tl, 0x000c, 0x0025, chunk_of_x25_bytes_with_ip_address_etc); + aim_tlvlist_add_raw(&tl, 0x0011, 0x0005, unknown 0x01 61 10 f6 41); + aim_tlvlist_add_16(&tl, 0x0012, unknown 0x00 00); +#endif aim_tlvlist_write(&fr->data, &tl); aim_tlvlist_free(&tl);