Mercurial > pidgin.yaz
changeset 7313:be7c1468c6a7
[gaim-migrate @ 7897]
I thought I commited some of this a while ago... oh well. None of it
is really important at all.
I uncommented the available message stuff, it might work for some
people (Sam), but doesn't work for me. I don't want to have to
comment this out again before 0.72... so someone get this working (Sam).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 22 Oct 2003 03:32:21 +0000 |
parents | b8ce6e194cff |
children | 227aecc2466e |
files | src/protocols/oscar/aim.h src/protocols/oscar/auth.c src/protocols/oscar/email.c src/protocols/oscar/locate.c src/protocols/oscar/oscar.c src/protocols/oscar/ssi.c |
diffstat | 6 files changed, 41 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/aim.h Wed Oct 22 03:32:21 2003 +0000 @@ -256,7 +256,7 @@ "us", "en", \ } -#define CLIENTINFO_ICQBasic_14_3_1068 { \ +#define CLIENTINFO_ICQBASIC_14_3_1068 { \ "ICQBasic", \ 0x010a, \ 0x0014, 0x0003, \ @@ -265,7 +265,7 @@ "us", "en", \ } -#define CLIENTINFO_Netscape_7_0_1 { \ +#define CLIENTINFO_NETSCAPE_7_0_1 { \ "Netscape 2000 an approved user of AOL Instant Messenger (SM)", \ 0x1d0d, \ 0x0007, 0x0000, \ @@ -1232,6 +1232,7 @@ faim_export int aim_ssi_setpermdeny(aim_session_t *sess, fu8_t permdeny, fu32_t vismask); faim_export int aim_ssi_setpresence(aim_session_t *sess, fu32_t presence); faim_export int aim_ssi_seticon(aim_session_t *sess, fu8_t *iconsum, fu16_t iconsumlen); +faim_export int aim_ssi_delicon(aim_session_t *sess);
--- a/src/protocols/oscar/auth.c Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/auth.c Wed Oct 22 03:32:21 2003 +0000 @@ -87,12 +87,9 @@ #endif /* - * Normally the FLAP version is sent as the first few bytes of the cookie, - * meaning you generally never call this. - * - * But there are times when something might want it seperate. Specifically, - * libfaim sends this internally when doing SNAC login. - * + * The FLAP version is sent by itself at the beginning of authorization + * connections. The FLAP version is also sent before the cookie when connecting + * for other services (BOS, chatnav, chat, etc.). */ faim_export int aim_sendflapver(aim_session_t *sess, aim_conn_t *conn) { @@ -185,8 +182,6 @@ /* * Subtype 0x0002 * - * send_login(int socket, char *sn, char *password) - * * This is the initial login request packet. * * NOTE!! If you want/need to make use of the aim_sendmemblock() function, @@ -277,7 +272,6 @@ * * The client should check the value passed as errorcode. If * its nonzero, there was an error. - * */ static int parse(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { @@ -469,7 +463,7 @@ if (!sess || !conn || !sn) return -EINVAL; - if ((sn[0] >= '0') && (sn[0] <= '9')) + if (isdigit(sn[0])) return goddamnicq(sess, conn, sn); aim_sendflapver(sess, conn);
--- a/src/protocols/oscar/email.c Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/email.c Wed Oct 22 03:32:21 2003 +0000 @@ -132,10 +132,13 @@ alerturl = aim_tlv_getstr(tlvlist, 0x000d, 1); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, new, havenewmail, alertitle, alerturl + 2); + ret = userfunc(sess, rx, new, havenewmail, alertitle, (alerturl ? alerturl + 2 : NULL)); aim_tlvlist_free(&tlvlist); + free(alertitle); + free(alerturl); + return ret; }
--- a/src/protocols/oscar/locate.c Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/locate.c Wed Oct 22 03:32:21 2003 +0000 @@ -948,7 +948,8 @@ aim_tlvlist_add_noval(&tl, 0x0004); } - aim_tlvlist_add_caps(&tl, 0x0005, caps); + if (caps != 0x00000000) + aim_tlvlist_add_caps(&tl, 0x0005, caps); if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + aim_tlvlist_size(&tl)))) return -ENOMEM;
--- a/src/protocols/oscar/oscar.c Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/oscar.c Wed Oct 22 03:32:21 2003 +0000 @@ -3411,7 +3411,7 @@ } if (alertitle) - gaim_debug(GAIM_DEBUG_MISC, "oscar", "Got an alert '%s' %s\n", alertitle, alerturl); + gaim_debug(GAIM_DEBUG_MISC, "oscar", "Got an alert '%s' %s\n", alertitle, alerturl ? alerturl : ""); return 1; } @@ -6339,22 +6339,22 @@ _("Cancel"), NULL, gc); } -#if 0 static void oscar_setavailmsg(GaimConnection *gc, char *text) { OscarData *od = (OscarData *)gc->proto_data; + aim_locate_setprofile(od->sess, NULL, NULL, 0, NULL, "", 0, 0); aim_srv_setavailmsg(od->sess, text); } static void oscar_show_setavailmsg(GaimConnection *gc) { - gaim_request_input(gc, NULL, _("Available Message:"), - NULL, "Please talk to me, I'm lonely! (and single)", TRUE, FALSE, + gaim_request_input(gc, NULL, _("Available Message:"), NULL, + _("I'm doing work and hoping for a distraction--IM me!"), + TRUE, FALSE, _("OK"), G_CALLBACK(oscar_setavailmsg), _("Cancel"), NULL, gc); } -#endif static void oscar_show_set_info(GaimConnection *gc) { @@ -6424,13 +6424,11 @@ pam->gc = gc; m = g_list_append(m, pam); -#if 0 pam = g_new0(struct proto_actions_menu, 1); pam->label = _("Set Available Message"); pam->callback = oscar_show_setavailmsg; pam->gc = gc; m = g_list_append(m, pam); -#endif pam = g_new0(struct proto_actions_menu, 1); pam->label = _("Change Password");
--- a/src/protocols/oscar/ssi.c Wed Oct 22 02:01:30 2003 +0000 +++ b/src/protocols/oscar/ssi.c Wed Oct 22 03:32:21 2003 +0000 @@ -1068,6 +1068,29 @@ } /** + * Remove a reference to a server stored buddy icon. This will make your + * icon stop showing up to other people. + * + * @param sess The oscar session. + * @return Return 0 if no errors, otherwise return the error number. + */ +faim_export int aim_ssi_delicon(aim_session_t *sess) +{ + struct aim_ssi_item *tmp; + + if (!sess) + return -EINVAL; + + /* Find the ICONINFO item and delete it if it exists*/ + if ((tmp = aim_ssi_itemlist_finditem(sess->ssi.local, NULL, "1", AIM_SSI_TYPE_ICONINFO))) + aim_ssi_itemlist_del(&sess->ssi.local, tmp); + + /* Sync our local list with the server list */ + aim_ssi_sync(sess); + return 0; +} + +/** * Stores your setting for whether you should show up as idle or not. * * @param sess The oscar session.