You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sean E. <sea...@us...> - 2002-05-05 19:08:08
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv23989/src/protocols/oscar Modified Files: aim.h auth.c buddylist.c info.c Log Message: More stuff from Kingant Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- aim.h 5 May 2002 19:02:05 -0000 1.41 +++ aim.h 5 May 2002 19:07:05 -0000 1.42 @@ -953,12 +953,12 @@ struct aim_icbmparameters { - unsigned short maxchan; - unsigned long flags; /* AIM_IMPARAM_FLAG_ */ - unsigned short maxmsglen; /* message size that you will accept */ - unsigned short maxsenderwarn; /* this and below are *10 (999=99.9%) */ - unsigned short maxrecverwarn; - unsigned long minmsginterval; /* in milliseconds? */ + fu16_t maxchan; + fu32_t flags; /* AIM_IMPARAM_FLAG_ */ + fu16_t maxmsglen; /* message size that you will accept */ + fu16_t maxsenderwarn; /* this and below are *10 (999=99.9%) */ + fu16_t maxrecverwarn; + fu32_t minmsginterval; /* in milliseconds? */ }; faim_export int aim_reqicbmparams(aim_session_t *sess); Index: auth.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/auth.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- auth.c 17 Mar 2002 04:24:52 -0000 1.6 +++ auth.c 5 May 2002 19:07:05 -0000 1.7 @@ -290,6 +290,10 @@ aim_encode_password_md5(password, key, digest); aim_addtlvtochain_raw(&tl, 0x0025, 16, digest); + /* + * Newer versions of winaim have an empty type x004c TLV here. + */ + if (ci->clientstring) aim_addtlvtochain_raw(&tl, 0x0003, strlen(ci->clientstring), ci->clientstring); aim_addtlvtochain16(&tl, 0x0016, (fu16_t)ci->clientid); @@ -304,7 +308,6 @@ * If set, old-fashioned buddy lists will not work. You will need * to use SSI. */ - aim_addtlvtochain8(&tl, 0x004a, 0x01); aim_writetlvchain(&fr->data, &tl); Index: buddylist.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/buddylist.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- buddylist.c 5 Nov 2001 02:05:06 -0000 1.5 +++ buddylist.c 5 May 2002 19:07:05 -0000 1.6 @@ -53,6 +53,12 @@ if (aim_gettlv(tlvlist, 0x0002, 1)) maxwatchers = aim_gettlv16(tlvlist, 0x0002, 1); + /* + * TLV type 0x0003: Unknown. + * + * ICQ only? + */ + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, maxbuddies, maxwatchers); Index: info.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/info.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- info.c 2 Mar 2002 04:52:21 -0000 1.14 +++ info.c 5 May 2002 19:07:05 -0000 1.15 @@ -579,6 +579,7 @@ * t(0001) - short containing max profile length (value = 1024) * t(0002) - short - unknown (value = 16) [max MIME type length?] * t(0003) - short - unknown (value = 10) + * t(0004) - short - unknown (value = 2048) [ICQ only?] */ static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { |
From: Sean E. <sea...@us...> - 2002-05-05 19:08:04
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv23281 Modified Files: ChangeLog Log Message: More OSCAR stuff from KingAnt! Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.470 retrieving revision 1.471 diff -u -d -r1.470 -r1.471 --- ChangeLog 5 May 2002 18:43:20 -0000 1.470 +++ ChangeLog 5 May 2002 19:02:04 -0000 1.471 @@ -15,7 +15,8 @@ * Better selection in GtkIMHtml (Thanks Ben Miller) * A warning when your OSCAR buddy list is too long (Thanks, Mark Doliner) - + * ICQ status messages in OSCAR (Thanks, Mark Doliner) + version 0.57 (04/25/2002): * New authorization method for Yahoo! * Polish translation updated (Thanks Przemyslaw Sulek) |
From: Sean E. <sea...@us...> - 2002-05-05 19:08:03
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv23281/src/protocols/oscar Modified Files: aim.h aim_cbtypes.h im.c oscar.c Log Message: More OSCAR stuff from KingAnt! Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- aim.h 5 May 2002 18:42:10 -0000 1.40 +++ aim.h 5 May 2002 19:02:05 -0000 1.41 @@ -854,6 +854,7 @@ faim_export aim_conn_t *aim_directim_initiate(aim_session_t *, const char *destsn); faim_export aim_conn_t *aim_directim_connect(aim_session_t *, const char *sn, const char *addr, const fu8_t *cookie); +faim_export int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type); faim_export aim_conn_t *aim_sendfile_initiate(aim_session_t *, const char *destsn, const char *filename, fu16_t numfiles, fu32_t totsize); faim_export int aim_send_im_ch4(aim_session_t *sess, char *sn, fu16_t type, fu8_t *message); Index: aim_cbtypes.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim_cbtypes.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- aim_cbtypes.h 12 Mar 2002 17:21:44 -0000 1.8 +++ aim_cbtypes.h 5 May 2002 19:02:06 -0000 1.9 @@ -97,7 +97,7 @@ #define AIM_CB_MSG_INCOMING 0x0007 #define AIM_CB_MSG_EVIL 0x0009 #define AIM_CB_MSG_MISSEDCALL 0x000a -#define AIM_CB_MSG_CLIENTERROR 0x000b +#define AIM_CB_MSG_CLIENTAUTORESP 0x000b #define AIM_CB_MSG_ACK 0x000c #define AIM_CB_MSG_DEFAULT 0xffff Index: im.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/im.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- im.c 20 Apr 2002 08:10:13 -0000 1.22 +++ im.c 5 May 2002 19:02:06 -0000 1.23 @@ -732,16 +732,127 @@ return 0; } -/* +/** + * Request the status message of the given ICQ user. + * + * @param sess The oscar session. + * @param sn The UIN of the user of whom you wish to request info. + * @param type The type of info you wish to request. This should be the current + * state of the user, as one of the AIM_ICQ_STATE_* defines. + * @return Return 0 if no errors, otherwise return the error number. + */ +faim_export int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type) +{ + aim_conn_t *conn; + int i; + fu8_t ck[8]; + aim_frame_t *fr; + aim_snacid_t snacid; + + if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)) || !sn) + return -EINVAL; + + for (i = 0; i < 8; i++) + aimutil_put8(ck+i, (fu8_t) rand()); + + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+8+2+1+strlen(sn) + 4+0x5e + 4))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0); + aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid); + + /* Cookie */ + aimbs_putraw(&fr->data, ck, 8); + + /* Channel (2) */ + aimbs_put16(&fr->data, 0x0002); + + /* Dest sn */ + aimbs_put8(&fr->data, strlen(sn)); + aimbs_putraw(&fr->data, sn, strlen(sn)); + + /* TLV t(0005) - Encompasses almost everything below. */ + aimbs_put16(&fr->data, 0x0005); /* T */ + aimbs_put16(&fr->data, 0x005e); /* L */ + { /* V */ + aimbs_put16(&fr->data, 0x0000); + + /* Cookie */ + aimbs_putraw(&fr->data, ck, 8); + + /* Put the 16 byte server relay capability */ + aim_putcap(&fr->data, AIM_CAPS_ICQSERVERRELAY); + + /* TLV t(000a) */ + aimbs_put16(&fr->data, 0x000a); + aimbs_put16(&fr->data, 0x0002); + aimbs_put16(&fr->data, 0x0001); + + /* TLV t(000f) */ + aimbs_put16(&fr->data, 0x000f); + aimbs_put16(&fr->data, 0x0000); + + /* TLV t(2711) */ + aimbs_put16(&fr->data, 0x2711); + aimbs_put16(&fr->data, 0x0036); + { /* V */ + aimbs_putle16(&fr->data, 0x001b); /* L */ + aimbs_putle16(&fr->data, 0x0008); /* AAA - Protocol version */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle16(&fr->data, 0x0000); /* Unknown */ + aimbs_putle16(&fr->data, 0x0003); /* Client features? */ + aimbs_putle16(&fr->data, 0x0000); /* Unknown */ + aimbs_putle8(&fr->data, 0x00); /* Unkizown */ + aimbs_putle16(&fr->data, 0xffff); /* Sequence number? XXX - This should decrement by 1 with each request */ + + aimbs_putle16(&fr->data, 0x000e); /* L */ + aimbs_putle16(&fr->data, 0xffff); /* Sequence number? XXX - This should decrement by 1 with each request */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + aimbs_putle32(&fr->data, 0x00000000); /* Unknown */ + + /* The type of status message being requested */ + if (type & AIM_ICQ_STATE_CHAT) + aimbs_putle16(&fr->data, 0x03ec); + else if(type & AIM_ICQ_STATE_DND) + aimbs_putle16(&fr->data, 0x03eb); + else if(type & AIM_ICQ_STATE_OUT) + aimbs_putle16(&fr->data, 0x03ea); + else if(type & AIM_ICQ_STATE_BUSY) + aimbs_putle16(&fr->data, 0x03e9); + else if(type & AIM_ICQ_STATE_AWAY) + aimbs_putle16(&fr->data, 0x03e8); + + aimbs_putle16(&fr->data, 0x0000); /* Status? */ + aimbs_putle16(&fr->data, 0x0001); /* Priority of this message? */ + aimbs_putle16(&fr->data, 0x0001); /* L? */ + aimbs_putle8(&fr->data, 0x00); /* Null termination? */ + } /* End TLV t(2711) */ + } /* End TLV t(0005) */ + + /* TLV t(0003) */ + aimbs_put16(&fr->data, 0x0003); + aimbs_put16(&fr->data, 0x0000); + + aim_tx_enqueue(sess, fr); + + return 0; +} + +/** * This can be used to send an ICQ authorization reply (deny or grant). It is the "old way." * The new way is to use SSI. I like the new way a lot better. This seems like such a hack, * mostly because it's in network byte order. Figuring this stuff out sometimes takes a while, * but thats ok, because it gives me time to try to figure out what kind of drugs the AOL people * were taking when they merged the two protocols. * - * sn is the destination screen name - * type is the type of message. 0x0007 for authorization denied. 0x0008 for authorization granted - * message is the message you want to send, it should be null terminated + * @param sn The destination screen name. + * @param type The type of message. 0x0007 for authorization denied. 0x0008 for authorization granted. + * @param message The message you want to send, it should be null terminated. + * @return Return 0 if no errors, otherwise return the error number. */ faim_export int aim_send_im_ch4(aim_session_t *sess, char *sn, fu16_t type, fu8_t *message) { @@ -1859,7 +1970,11 @@ return ret; } -static int clienterr(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) +/* + * Receive the response from an ICQ status message request. This contains the + * ICQ status message. Go figure. + */ +static int clientautoresp(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { int ret = 0; aim_rxcallback_t userfunc; @@ -1873,8 +1988,58 @@ sn = aimbs_getstr(bs, snlen); reason = aimbs_get16(bs); - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, channel, sn, reason); + switch (reason) { + case 0x0003: { /* ICQ status message. Maybe other stuff too, you never know with these people. */ + fu8_t statusmsgtype, *msg; + fu16_t len; + fu32_t state; + + len = aimbs_getle16(bs); /* Should be 0x001b */ + free(aimbs_getraw(bs, len)); /* Unknown */ + + len = aimbs_getle16(bs); /* Should be 0x000e */ + free(aimbs_getraw(bs, len)); /* Unknown */ + + statusmsgtype = aimbs_getle8(bs); + switch (statusmsgtype) { + case 0xe8: + state = AIM_ICQ_STATE_AWAY; + break; + case 0xe9: + state = AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY; + break; + case 0xea: + state = AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_OUT; + break; + case 0xeb: + state = AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY; + break; + case 0xec: + state = AIM_ICQ_STATE_CHAT; + break; + default: + state = 0; + break; + } + + aimbs_getle8(bs); /* Unknown - 0x03 Maybe this means this is an auto-reply */ + aimbs_getle16(bs); /* Unknown - 0x0000 */ + aimbs_getle16(bs); /* Unknown - 0x0000 */ + + len = aimbs_getle16(bs); + msg = aimbs_getraw(bs, len); + + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, channel, sn, reason, state, msg); + + free(msg); + } break; + + default: { + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, channel, sn, reason); + } break; + } /* end switch */ free(ck); free(sn); @@ -1916,7 +2081,7 @@ else if (snac->subtype == 0x000a) return missedcall(sess, mod, rx, snac, bs); else if (snac->subtype == 0x000b) - return clienterr(sess, mod, rx, snac, bs); + return clientautoresp(sess, mod, rx, snac, bs); else if (snac->subtype == 0x000c) return msgack(sess, mod, rx, snac, bs); Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- oscar.c 5 May 2002 18:42:10 -0000 1.135 +++ oscar.c 5 May 2002 19:02:08 -0000 1.136 @@ -243,6 +243,7 @@ static int gaim_parse_offgoing (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_incoming_im(aim_session_t *, aim_frame_t *, ...); static int gaim_parse_misses (aim_session_t *, aim_frame_t *, ...); +static int gaim_parse_clientauto (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_user_info (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_motd (aim_session_t *, aim_frame_t *, ...); static int gaim_chatnav_info (aim_session_t *, aim_frame_t *, ...); @@ -691,6 +692,7 @@ aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_INCOMING, gaim_parse_incoming_im, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_ERROR, gaim_parse_locerr, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_MISSEDCALL, gaim_parse_misses, 0); + aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_CLIENTAUTORESP, gaim_parse_clientauto, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATECHANGE, gaim_parse_ratechange, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_EVIL, gaim_parse_evilnotify, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, AIM_CB_LOK_ERROR, gaim_parse_searcherror, 0); @@ -1630,6 +1632,83 @@ return 1; } +static char *gaim_icq_status(int state) { + /* Make a cute little string that shows the status of the dude or dudet */ + if (state & AIM_ICQ_STATE_CHAT) + return g_strdup_printf("Free For Chat"); + else if (state & AIM_ICQ_STATE_DND) + return g_strdup_printf("Do Not Disturb"); + else if (state & AIM_ICQ_STATE_OUT) + return g_strdup_printf("Not Available"); + else if (state & AIM_ICQ_STATE_BUSY) + return g_strdup_printf("Occupied"); + else if (state & AIM_ICQ_STATE_AWAY) + return g_strdup_printf("Away"); + else if (state & AIM_ICQ_STATE_WEBAWARE) + return g_strdup_printf("Web Aware"); + else if (state & AIM_ICQ_STATE_INVISIBLE) + return g_strdup_printf("Invisible"); + else + return g_strdup_printf("Online"); +} + +static int gaim_parse_clientauto(aim_session_t *sess, aim_frame_t *fr, ...) { + struct gaim_connection *gc = sess->aux_data; + va_list ap; + fu16_t chan, reason; + char *who; + + va_start(ap, fr); + chan = (fu16_t)va_arg(ap, unsigned int); + who = va_arg(ap, char *); + reason = (fu16_t)va_arg(ap, unsigned int); + + switch(reason) { + case 0x0003: { /* Reply from an ICQ status message request */ + int state = (int)va_arg(ap, fu32_t); + char *msg = va_arg(ap, char *); + char *status_msg = gaim_icq_status(state); + char *dialog_msg, **splitmsg; + struct oscar_data *od = gc->proto_data; + GSList *l = od->evilhack; + gboolean evilhack = FALSE; + + /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ + splitmsg = g_strsplit(msg, "\r\n", 0); + + /* If who is in od->evilhack, then we're just getting the away message, otherwise this + * will just get appended to the info box (which is already showing). */ + while (l) { + char *x = l->data; + if (!strcmp(x, normalize(who))) { + evilhack = TRUE; + g_free(x); + od->evilhack = g_slist_remove(od->evilhack, x); + break; + } + l = l->next; + } + + if (evilhack) + dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR><BR>%s<BR>"), who, status_msg, g_strjoinv("<BR>", splitmsg)); + else + dialog_msg = g_strdup_printf(_("<B>Status:</B> %s<BR><HR><BR>%s<BR>"), status_msg, g_strjoinv("<BR>", splitmsg)); + g_show_info_text(gc, who, 2, dialog_msg, NULL); + + g_free(status_msg); + g_free(dialog_msg); + g_strfreev(splitmsg); + } break; + + default: { + debug_printf("Received an unknown client auto-response from %s. Type 0x%04x\n", who, reason); + } break; + } + va_end(ap); + + return 1; +} + static int gaim_parse_genericerr(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; fu16_t reason; @@ -2397,6 +2476,7 @@ static int gaim_simpleinfo(aim_session_t *sess, aim_frame_t *fr, ...) { struct gaim_connection *gc = sess->aux_data; + struct buddy *budlight; va_list ap; struct aim_icq_simpleinfo *info; char buf[16 * 1024]; @@ -2411,13 +2491,31 @@ "<B>UIN:</B> %lu<BR>" "<B>Nick:</B> %s<BR>" "<B>Name:</B> %s %s<BR>" - "<B>Email:</B> %s\n", + "<B>Email:</B> %s<BR>\n", info->uin, info->nick, info->first, info->last, info->email); - g_show_info_text(gc, who, FALSE, buf, NULL); + /* If the contact is away, then we also want to get their status message + * and show it in the same window as info. g_show_info_text gets the status + * message if the third arg is 0 (this seems really gross to me). The + * parse-icq-status-message function knows if it is putting it's message in + * an info window because the name will _not_ be in od->evilhack. For getting + * only the away message the contact's UIN is put in od->evilhack. */ + if ((budlight = find_buddy(gc, who)) && ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT))) { + if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) + g_show_info_text(gc, who, 0, buf, NULL); + else { + char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); + g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, "<BR>\n<HR><BR><I>Remote client does not support sending status messages.</I><BR>\n", NULL); + free(state_msg); + } + } else { + char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); + g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, NULL); + free(state_msg); + } return 1; } @@ -2459,7 +2557,7 @@ at += g_snprintf(buf + at, len - at, "<B>%s has the following screen names:</B><BR>", address); for (i = 0; i < num; i++) at += g_snprintf(buf + at, len - at, "%s<BR>", &SNs[i * (MAXSNLEN + 1)]); - g_show_info_text(NULL, NULL, FALSE, buf, NULL); + g_show_info_text(NULL, NULL, 2, buf, NULL); g_free(buf); return 1; @@ -2635,10 +2733,22 @@ aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); } -static void oscar_get_away(struct gaim_connection *g, char *name) { +static void oscar_get_away(struct gaim_connection *g, char *who) { struct oscar_data *odata = (struct oscar_data *)g->proto_data; - if (!odata->icq) - aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); + if (odata->icq) { + struct buddy *budlight = find_buddy(g, who); + if (budlight) + if ((budlight->uc & 0xff80) >> 7) + if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) + aim_send_im_ch2_geticqmessage(odata->sess, who, (budlight->uc & 0xff80) >> 7); + else + debug_printf("Error: Remote client does not support retrieval of status messages.\n"); + else + debug_printf("Error: The user %s has no status message, therefore not requesting.\n", who); + else + debug_printf("Error: Could not find %s in local contact list, therefore unable to request status message.\n", who); + } else + aim_getinfo(odata->sess, odata->conn, who, AIM_GETINFO_GENERALINFO); } static void oscar_get_caps(struct gaim_connection *g, char *name) { @@ -2729,13 +2839,13 @@ aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); gc->away = ""; } else if (!strcmp(state, "Do Not Disturb")) { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_DND); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY); gc->away = ""; } else if (!strcmp(state, "Not Available")) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY); gc->away = ""; } else if (!strcmp(state, "Occupied")) { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_BUSY); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY); gc->away = ""; } else if (!strcmp(state, "Free For Chat")) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT); @@ -3236,12 +3346,12 @@ return icon_offline_xpm; if (uc & AIM_ICQ_STATE_CHAT) return icon_ffc_xpm; - if (uc & AIM_ICQ_STATE_BUSY) - return icon_occ_xpm; - if (uc & AIM_ICQ_STATE_OUT) - return icon_na_xpm; if (uc & AIM_ICQ_STATE_DND) return icon_dnd_xpm; + if (uc & AIM_ICQ_STATE_OUT) + return icon_na_xpm; + if (uc & AIM_ICQ_STATE_BUSY) + return icon_occ_xpm; if (uc & AIM_ICQ_STATE_AWAY) return icon_away_xpm; return icon_online_xpm; @@ -3433,7 +3543,30 @@ static void oscar_get_away_msg(struct gaim_connection *gc, char *who) { struct oscar_data *od = gc->proto_data; od->evilhack = g_slist_append(od->evilhack, g_strdup(normalize(who))); - oscar_get_info(gc, who); + if (od->icq) { + struct buddy *budlight = find_buddy(gc, who); + if (budlight) + if ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT)) + if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) + aim_send_im_ch2_geticqmessage(od->sess, who, (budlight->uc & 0xff80) >> 7); + else { + char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); + char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR><BR><I>Remote client does not support sending status messages.</I><BR>"), who, state_msg); + g_show_info_text(gc, who, 2, dialog_msg, NULL); + free(state_msg); + free(dialog_msg); + } + else { + char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); + char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR><BR><I>User has no status message.</I><BR>"), who, state_msg); + g_show_info_text(gc, who, 2, dialog_msg, NULL); + free(state_msg); + free(dialog_msg); + } + else + do_error_dialog("Could not find contact in local list, therefore unable to request status message.\n", "Gaim - Error"); + } else + oscar_get_info(gc, who); } static GList *oscar_buddy_menu(struct gaim_connection *gc, char *who) { @@ -3448,7 +3581,13 @@ pbm->gc = gc; m = g_list_append(m, pbm); - if (!odata->icq) { + if (odata->icq) { + pbm = g_new0(struct proto_buddy_menu, 1); + pbm->label = _("Get Status Msg"); + pbm->callback = oscar_get_away_msg; + pbm->gc = gc; + m = g_list_append(m, pbm); + } else { pbm = g_new0(struct proto_buddy_menu, 1); pbm->label = _("Get Away Msg"); pbm->callback = oscar_get_away_msg; |
From: Sean E. <sea...@us...> - 2002-05-05 18:43:23
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv18468 Modified Files: ChangeLog Log Message: Thanks, Mark Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.469 retrieving revision 1.470 diff -u -d -r1.469 -r1.470 --- ChangeLog 5 May 2002 01:06:15 -0000 1.469 +++ ChangeLog 5 May 2002 18:43:20 -0000 1.470 @@ -13,6 +13,8 @@ * Added helpful stuff to the Help menu. * Self-aliasing from the account editor. * Better selection in GtkIMHtml (Thanks Ben Miller) + * A warning when your OSCAR buddy list is too long + (Thanks, Mark Doliner) version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-05 18:42:15
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv18131/src/protocols/oscar Modified Files: aim.h oscar.c ssi.c Log Message: Among other things, a warning for when your OSCAR buddy list is too long. Thanks KingAnt Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- aim.h 12 Apr 2002 02:43:50 -0000 1.39 +++ aim.h 5 May 2002 18:42:10 -0000 1.40 @@ -1037,10 +1037,11 @@ faim_export int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn); /* These handle the local variables */ -faim_export int aim_ssi_inlist(aim_session_t *sess, aim_conn_t *conn, char *name, fu16_t type); -faim_export char *aim_ssi_getparentgroup(aim_session_t *sess, aim_conn_t *conn, char *name); -faim_export int aim_ssi_getpermdeny(aim_session_t *sess, aim_conn_t *conn); -faim_export fu32_t aim_ssi_getpresence(aim_session_t *sess, aim_conn_t *conn); +faim_export struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, fu16_t gid, fu16_t bid); +faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, char *gn, char *sn, fu16_t type); +faim_export struct aim_ssi_item *aim_ssi_itemlist_findparent(struct aim_ssi_item *list, char *sn); +faim_export int aim_ssi_getpermdeny(struct aim_ssi_item *list); +faim_export fu32_t aim_ssi_getpresence(struct aim_ssi_item *list); faim_export int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num); faim_export int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn); @@ -1052,7 +1053,7 @@ faim_export int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num); faim_export int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type); -faim_export int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, int permdeny); +faim_export int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, fu8_t permdeny, fu32_t vismask); faim_export int aim_ssi_setpresence(aim_session_t *sess, aim_conn_t *conn, fu32_t presence); struct aim_icq_offlinemsg { Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- oscar.c 26 Apr 2002 22:32:37 -0000 1.134 +++ oscar.c 5 May 2002 18:42:10 -0000 1.135 @@ -2785,7 +2785,7 @@ if (odata->icq) { aim_add_buddy(odata->sess, odata->conn, name); } else { - if ((odata->sess->ssi.received_data) && !(aim_ssi_inlist(odata->sess, odata->conn, name, 0x0000))) { + if ((odata->sess->ssi.received_data) && !(aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, name, 0x0000))) { debug_printf("ssi: adding buddy %s to group %s\n", name, find_group_by_buddy(g, name)->name); aim_ssi_addbuddies(odata->sess, odata->conn, find_group_by_buddy(g, name)->name, &name, 1); } @@ -2813,13 +2813,13 @@ for (curgrp=g->groups; curgrp; curgrp=g_slist_next(curgrp)) { tmp = 0; for (curbud=((struct group*)curgrp->data)->members; curbud; curbud=curbud->next) - if (!aim_ssi_inlist(odata->sess, odata->conn, ((struct buddy*)curbud->data)->name, 0x0000)) + if (!aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, ((struct buddy*)curbud->data)->name, 0x0000)) tmp++; if (tmp) { char **sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; for (curbud=((struct group*)curgrp->data)->members; curbud; curbud=curbud->next) - if (!aim_ssi_inlist(odata->sess, odata->conn, ((struct buddy*)curbud->data)->name, 0x0000)) { + if (!aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, ((struct buddy*)curbud->data)->name, 0x0000)) { debug_printf("ssi: adding buddy %s to group %s\n", ((struct buddy*)curbud->data)->name, ((struct group*)curgrp->data)->name); sns[tmp] = (char *)((struct buddy*)curbud->data)->name; tmp++; @@ -2847,8 +2847,8 @@ aim_remove_buddy(odata->sess, odata->conn, name); } else { if (odata->sess->ssi.received_data) { - char *ssigroup; - while (aim_ssi_inlist(odata->sess, odata->conn, name, 0x0000) && (ssigroup = aim_ssi_getparentgroup(odata->sess, odata->conn, name)) && !aim_ssi_delbuddies(odata->sess, odata->conn, ssigroup, &name, 1)) + struct aim_ssi_item *ssigroup; + while (aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, name, 0x0000) && (ssigroup = aim_ssi_itemlist_findparent(odata->sess->ssi.items, name)) && !aim_ssi_delbuddies(odata->sess, odata->conn, ssigroup->name, &name, 1)) debug_printf("ssi: deleted buddy %s from group %s\n", name, group); } } @@ -2865,14 +2865,14 @@ GList *cur; int tmp = 0; for (cur=buddies; cur; cur=cur->next) - if (aim_ssi_inlist(odata->sess, odata->conn, cur->data, 0x0000)) + if (aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, cur->data, 0x0000)) tmp++; if (tmp) { char **sns; sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; for (cur=buddies; cur; cur=cur->next) - if (aim_ssi_inlist(odata->sess, odata->conn, cur->data, 0x0000)) { + if (aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, cur->data, 0x0000)) { debug_printf("ssi: deleting buddy %s from group %s\n", cur->data, group); sns[tmp] = cur->data; tmp++; @@ -2919,7 +2919,7 @@ aim_ssi_enable(sess, fr->conn); /* Clean the buddy list */ - /* aim_ssi_cleanlist(sess, fr->conn); */ + aim_ssi_cleanlist(sess, fr->conn); /* Add from server list to local list */ tmp = 0; @@ -2972,7 +2972,7 @@ case 0x0004: /* Permit/deny setting */ if (curitem->data) { fu8_t permdeny; - if ((permdeny = aim_ssi_getpermdeny(sess, fr->conn)) && (permdeny != gc->permdeny)) { + if ((permdeny = aim_ssi_getpermdeny(sess->ssi.items)) && (permdeny != gc->permdeny)) { debug_printf("ssi: changing permdeny from %d to %d\n", gc->permdeny, permdeny); gc->permdeny = permdeny; tmp++; @@ -2998,13 +2998,13 @@ GSList *curbud; tmp = 0; for (curbud=((struct group*)cur->data)->members; curbud; curbud=curbud->next) - if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)curbud->data)->name, 0x0000)) + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, ((struct buddy*)curbud->data)->name, 0x0000)) tmp++; if (tmp) { sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; for (curbud=((struct group*)cur->data)->members; curbud; curbud=curbud->next) - if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)curbud->data)->name, 0x0000)) { + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, ((struct buddy*)curbud->data)->name, 0x0000)) { debug_printf("ssi: adding buddy %s from local list to server list\n", ((struct buddy*)curbud->data)->name); sns[tmp] = ((char *)((struct buddy*)curbud->data)->name); tmp++; @@ -3019,13 +3019,13 @@ if (gc->permit) { tmp = 0; for (cur=gc->permit; cur; cur=cur->next) - if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0002)) + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, cur->data, 0x0002)) tmp++; if (tmp) { sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; for (cur=gc->permit; cur; cur=cur->next) - if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0002)) { + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, cur->data, 0x0002)) { debug_printf("ssi: adding permit %s from local list to server list\n", cur->data); sns[tmp] = cur->data; tmp++; @@ -3039,13 +3039,13 @@ if (gc->deny) { tmp = 0; for (cur=gc->deny; cur; cur=cur->next) - if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0003)) + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, cur->data, 0x0003)) tmp++; if (tmp) { sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; for (cur=gc->deny; cur; cur=cur->next) - if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0003)) { + if (!aim_ssi_itemlist_finditem(sess->ssi.items, NULL, cur->data, 0x0003)) { debug_printf("ssi: adding deny %s from local list to server list\n", cur->data); sns[tmp] = cur->data; tmp++; @@ -3056,10 +3056,23 @@ } /* Presence settings (idle time visibility) */ - if ((tmp = aim_ssi_getpresence(sess, fr->conn)) != 0xFFFFFFFF) + if ((tmp = aim_ssi_getpresence(sess->ssi.items)) != 0xFFFFFFFF) if (report_idle && !(tmp & 0x400)) aim_ssi_setpresence(sess, fr->conn, tmp | 0x400); - } + + /* Check for maximum number of buddies */ + for (cur=gc->groups, tmp=0; cur; cur=g_slist_next(cur)) { + tmp = tmp + g_slist_length(cur->data->members); + + if (tmp > odata->rights.maxbuddies) { + char *dialog_msg = g_strdup_printf(_("The maximum number of buddies allowed in your buddy list is %d, and you have %d." + " Until you are below the limit, some buddies will not show up as online."), + odata->rights.maxbuddies, tmp); + do_error_dialog(dialog_msg, _("Gaim - Warning")); + g_free(dialog_msg); + } + + } /* end if (gc) */ return 1; } @@ -3520,7 +3533,7 @@ signoff_blocked(gc); } else { if (od->sess->ssi.received_data) - aim_ssi_setpermdeny(od->sess, od->conn, gc->permdeny); + aim_ssi_setpermdeny(od->sess, od->conn, gc->permdeny, 0xffffffff); } } Index: ssi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ssi.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ssi.c 12 Apr 2002 02:40:41 -0000 1.8 +++ ssi.c 5 May 2002 18:42:11 -0000 1.9 @@ -5,6 +5,15 @@ * such as a users buddy list, permit/deny list, and permit/deny preferences, * to be stored on the server, so that they can be accessed from any client. * + * We keep a copy of the ssi data in sess->ssi, because the data needs to be + * accessed for various reasons. So all the "aim_ssi_itemlist_bleh" functions + * near the top just manage the local data. + * + * The SNAC sending and receiving functions are lower down in the file, and + * they're simpler. They are in the order of the subtypes they deal with, + * starting with the request rights function (subtype 0x0002), then parse + * rights (subtype 0x0003), then--well, you get the idea. [...1238 lines suppressed...] - - /* Send the add item SNAC */ aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD); } @@ -1074,6 +1182,14 @@ fu8_t fmtver; /* guess */ fu16_t revision; fu32_t timestamp; + + /* When you set the version for the SSI family to 2-4, the beginning of this changes. + * Instead of the version and then the revision, there is "0x0006" and then a type + * 0x0001 TLV containing the 2 byte SSI family version that you sent earlier. Also, + * the SNAC flags go from 0x0000 to 0x8000. I guess the 0x0006 is the length of the + * TLV(s) that follow. The rights SNAC does the same thing, with the differing flag + * and everything. + */ fmtver = aimbs_get8(bs); /* Version of ssi data. Should be 0x00 */ revision = aimbs_get16(bs); /* # of times ssi data has been modified */ |
From: Sean E. <sea...@us...> - 2002-05-05 01:16:48
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26931/src Modified Files: aim.c conversation.c Log Message: If gtkspell can't use ispell, it tries aspell; Thanks Andrew Sayman Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.179 retrieving revision 1.180 diff -u -d -r1.179 -r1.180 --- aim.c 12 Apr 2002 02:30:41 -0000 1.179 +++ aim.c 5 May 2002 01:16:45 -0000 1.180 @@ -63,6 +63,7 @@ #include <getopt.h> #endif +static gchar *aspell_cmd[] = { "aspell", "--sug-mode=fast","-a", NULL }; static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; static GtkWidget *name; @@ -795,9 +796,19 @@ if (misc_options & OPT_MISC_DEBUG) show_debug(); - - if (convo_options & OPT_CONVO_CHECK_SPELLING) - gtkspell_start(NULL, ispell_cmd); + /*If ispell fails to start, try using aspell in ispell compatibitity mode. + Gabber does this the same way -- lor...@my...*/ + if (convo_options & OPT_CONVO_CHECK_SPELLING){ + if (gtkspell_start(NULL, ispell_cmd)<0){ + debug_printf("gtkspell failed to start when using ispell\n"); + if (gtkspell_start(NULL, aspell_cmd)<0){ + debug_printf("gtkspell failed to start when using aspell\n"); + } else + debug_printf("gtkspell started with aspell\n"); + } else { + debug_printf("gtkspell started with ispell\n"); + } + } #ifdef USE_PERL perl_autoload(); #endif Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.351 retrieving revision 1.352 diff -u -d -r1.351 -r1.352 --- conversation.c 4 May 2002 08:21:30 -0000 1.351 +++ conversation.c 5 May 2002 01:16:45 -0000 1.352 @@ -65,6 +65,7 @@ #include "pixmaps/farted.xpm" static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; +static gchar *aspell_cmd[] = { "aspell", "--sug-mode=fast","-a", NULL }; int state_lock = 0; @@ -2899,8 +2900,19 @@ GSList *con = connections; struct gaim_connection *gc; - if (convo_options & OPT_CONVO_CHECK_SPELLING) - gtkspell_start(NULL, ispell_cmd); + if (convo_options & OPT_CONVO_CHECK_SPELLING){ + /*If ispell fails to start, start aspell. This is the way that + Gabber does it. -- lor...@my... */ + if (gtkspell_start(NULL, ispell_cmd)<0){ + debug_printf("gtkspell failed to start when using ispell\n"); + if (gtkspell_start(NULL, aspell_cmd)<0){ + debug_printf("gtkspell failed to start when using aspell\n"); + } else + debug_printf("gtkspell started with aspell\n"); + } else { + debug_printf("gtkspell started with ispell\n"); + } + } while (cnv) { c = (struct conversation *)cnv->data; |
From: Sean E. <sea...@us...> - 2002-05-05 01:06:19
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv25151 Modified Files: ChangeLog Log Message: Better detection of words in gtkimhtml selection by Ben Miller Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.468 retrieving revision 1.469 diff -u -d -r1.468 -r1.469 --- ChangeLog 4 May 2002 08:21:30 -0000 1.468 +++ ChangeLog 5 May 2002 01:06:15 -0000 1.469 @@ -12,6 +12,7 @@ (Thanks, Ari Pollak) * Added helpful stuff to the Help menu. * Self-aliasing from the account editor. + * Better selection in GtkIMHtml (Thanks Ben Miller) version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-05 01:06:19
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv25151/src Modified Files: gtkimhtml.c Log Message: Better detection of words in gtkimhtml selection by Ben Miller Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- gtkimhtml.c 26 Apr 2002 01:34:02 -0000 1.106 +++ gtkimhtml.c 5 May 2002 01:06:15 -0000 1.107 @@ -1178,14 +1178,32 @@ start = chunk->sel_start; end = chunk->sel_end; - if (start != chunk->text) - while (start > chunk->text && *(start-1) != ' ') - start--; + if (start != chunk->text) { + if (isalnum(*start) || *start == '\'') + while (start > chunk->text && + (isalnum(*(start-1)) || *(start-1) == '\'')) + start--; + else if (isspace(*start)) + while (start > chunk->text && isspace(*(start-1))) + start--; + else if (ispunct(*start)) + while (start > chunk->text && ispunct(*(start-1))) + start--; + } chunk->sel_start = start; - if (end != NULL) - while (*end != '\0' && *end != ' ') - end++; + if (end != NULL) { + if (isalnum(*end) || *end == '\'') + while (*end != '\0' && + (isalnum(*end) || *end == '\'')) + end++; + else if (isspace(*end)) + while (*end != '\0' && isspace(*end)) + end++; + else if (ispunct(*end)) + while (*end != '\0' && ispunct(*end)) + end++; + } chunk->sel_end = end; } |
From: Jim S. <jse...@us...> - 2002-05-04 19:06:19
|
Update of /cvsroot/gaim/gaim/m4 In directory usw-pr-cvs1:/tmp/cvs-serv17503/m4 Modified Files: ac_var_timezone_externals.m4 Log Message: Replaced back-tics with forward-tics for autoconf 2.13 compatibility. Index: ac_var_timezone_externals.m4 =================================================================== RCS file: /cvsroot/gaim/gaim/m4/ac_var_timezone_externals.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ac_var_timezone_externals.m4 3 May 2002 01:09:49 -0000 1.1 +++ ac_var_timezone_externals.m4 4 May 2002 19:06:01 -0000 1.2 @@ -1,10 +1,10 @@ # Define 'timezone', 'altzone' and 'daylight' # http://www.gnu.org/software/ac-archive/Miscellaneous/ac_var_timezone_externals.html -# Use instead of `AC_STRUCT_TIMEZONE' to determine whether the -# the external timezone variables `timezone', `altzone' and `daylight' exist, -# defining `HAVE_TIMEZONE', `HAVE_ALTZONE' and `HAVE_DAYLIGHT' respectively -# (as well as gaining the macros defined by `AC_STRUCT_TIMEZONE'). +# Use instead of 'AC_STRUCT_TIMEZONE' to determine whether the +# the external timezone variables 'timezone', 'altzone' and 'daylight' exist, +# defining 'HAVE_TIMEZONE', 'HAVE_ALTZONE' and 'HAVE_DAYLIGHT' respectively +# (as well as gaining the macros defined by 'AC_STRUCT_TIMEZONE'). # Mark R.Bannister <ma...@fr...> AC_DEFUN([AC_VAR_TIMEZONE_EXTERNALS], [ AC_REQUIRE([AC_STRUCT_TIMEZONE])dnl @@ -25,14 +25,14 @@ ]) if test $mb_cv_var_timezone = yes; then AC_DEFINE([HAVE_TIMEZONE], 1, - [Define if you have the external `timezone' variable.]) + [Define if you have the external 'timezone' variable.]) fi if test $mb_cv_var_altzone = yes; then AC_DEFINE([HAVE_ALTZONE], 1, - [Define if you have the external `altzone' variable.]) + [Define if you have the external 'altzone' variable.]) fi if test $mb_cv_var_daylight = yes; then AC_DEFINE([HAVE_DAYLIGHT], 1, - [Define if you have the external `daylight' variable.]) + [Define if you have the external 'daylight' variable.]) fi ]) |
From: Jim S. <jse...@us...> - 2002-05-04 13:12:57
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv26305 Modified Files: acconfig.h Log Message: Final (?) HAVE_TIMEZONE cleanup. (faceprint) Index: acconfig.h =================================================================== RCS file: /cvsroot/gaim/gaim/acconfig.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- acconfig.h 21 Apr 2002 22:08:41 -0000 1.16 +++ acconfig.h 4 May 2002 13:12:55 -0000 1.17 @@ -24,4 +24,3 @@ #endif #undef socklen_t #undef HAVE_TM_GMTOFF -#undef HAVE_TIMEZONE |
From: Sean E. <sea...@us...> - 2002-05-04 08:21:33
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv31863/src Modified Files: conversation.c core.h gaimrc.c multi.c ui.h Log Message: Self-aliasing from the account editor. You can edit how your screenname shows up in sent messages without having yourself on your list. This is strictly client-side only--has no affect on what your buddies see. I'm thinking it might not be a bad idea to add the alias somewhere in the various select-account menus and lists. This could potentially fix the can't-tell-what-IRC-account-I'm-joining-channels-in problem, but I'm not sure the best way to do it right now--I'll do it tommorow. IM me if you have good ideas. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.350 retrieving revision 1.351 diff -u -d -r1.350 -r1.351 --- conversation.c 25 Apr 2002 05:57:45 -0000 1.350 +++ conversation.c 4 May 2002 08:21:30 -0000 1.351 @@ -1764,6 +1764,8 @@ b = find_buddy(c->gc, c->gc->username); if (b && strcmp(b->name, b->show)) who = b->show; + else if (c->gc->user->alias[0]) + who = c->gc->user->alias; else if (c->gc->displayname[0]) who = c->gc->displayname; else Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- core.h 12 Apr 2002 02:15:24 -0000 1.17 +++ core.h 4 May 2002 08:21:31 -0000 1.18 @@ -38,8 +38,12 @@ /* Really user states are controlled by the PRPLs now. We just use this for event_away */ #define UC_UNAVAILABLE 1 +/* This is far too long to be practical, but MSN users are probably used to long aliases */ +#define SELF_ALIAS_LEN 400 + struct aim_user { char username[64]; + char alias[SELF_ALIAS_LEN]; char password[32]; char user_info[2048]; int options; Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- gaimrc.c 28 Mar 2002 18:05:48 -0000 1.94 +++ gaimrc.c 4 May 2002 08:21:31 -0000 1.95 @@ -534,6 +534,19 @@ g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", p->value[0]); + if (!fgets(buf, sizeof(buf), f)) + return u; + + if (!strcmp(buf, "\t}")) + return u; + + p = parse_line(buf); + + if (strcmp(p->option, "alias")) + return u; + + g_snprintf(u->alias, sizeof(u->alias), "%s", p->value[0]); + return u; } @@ -570,8 +583,8 @@ fprintf(f, " { %s }", u->proto_opt[i]); fprintf(f, "\n"); fprintf(f, "\t\ticonfile { %s }\n", u->iconfile); + fprintf(f, "\t\talias { %s }\n", u->alias); } - static void gaimrc_read_users(FILE *f) { Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- multi.c 29 Mar 2002 13:28:55 -0000 1.115 +++ multi.c 4 May 2002 08:21:31 -0000 1.116 @@ -275,6 +275,8 @@ a->protocol = u->protocol; txt = gtk_entry_get_text(GTK_ENTRY(u->name)); g_snprintf(a->username, sizeof(a->username), "%s", txt); + txt = gtk_entry_get_text(GTK_ENTRY(u->alias)); + g_snprintf(a->alias, sizeof(a->alias), "%s", txt); txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); if (a->options & OPT_USR_REM_PASS) g_snprintf(a->password, sizeof(a->password), "%s", txt); @@ -553,6 +555,15 @@ hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + + label = gtk_label_new(_("Alias:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + + u->alias = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), u->alias, TRUE, TRUE, 0); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); label = gtk_label_new(_("Protocol:")); @@ -567,6 +578,7 @@ if (u->user) { gtk_entry_set_text(GTK_ENTRY(u->name), u->user->username); + gtk_entry_set_text(GTK_ENTRY(u->alias), u->user->alias); gtk_entry_set_text(GTK_ENTRY(u->pass), u->user->password); } Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ui.h 27 Apr 2002 19:41:07 -0000 1.36 +++ ui.h 4 May 2002 08:21:31 -0000 1.37 @@ -242,6 +242,7 @@ GtkWidget *mod; GtkWidget *main; GtkWidget *name; + GtkWidget *alias; GtkWidget *pwdbox; GtkWidget *pass; GtkWidget *rempass; |
From: Sean E. <sea...@us...> - 2002-05-04 08:21:33
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv31863 Modified Files: ChangeLog Log Message: Self-aliasing from the account editor. You can edit how your screenname shows up in sent messages without having yourself on your list. This is strictly client-side only--has no affect on what your buddies see. I'm thinking it might not be a bad idea to add the alias somewhere in the various select-account menus and lists. This could potentially fix the can't-tell-what-IRC-account-I'm-joining-channels-in problem, but I'm not sure the best way to do it right now--I'll do it tommorow. IM me if you have good ideas. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.467 retrieving revision 1.468 diff -u -d -r1.467 -r1.468 --- ChangeLog 3 May 2002 20:03:05 -0000 1.467 +++ ChangeLog 4 May 2002 08:21:30 -0000 1.468 @@ -10,6 +10,8 @@ Brian Bernas) * Hide and unhide functions for the filectl plugin. (Thanks, Ari Pollak) + * Added helpful stuff to the Help menu. + * Self-aliasing from the account editor. version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-04 04:20:45
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv27207/src Modified Files: buddy.c prefs.c Log Message: What? Help? In the help menu? Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.310 retrieving revision 1.311 diff -u -d -r1.310 -r1.311 --- buddy.c 4 May 2002 02:06:24 -0000 1.310 +++ buddy.c 4 May 2002 04:20:42 -0000 1.311 @@ -2458,7 +2458,7 @@ return menuitem; } -GtkWidget *gaim_new_item_with_pixmap(GtkWidget *menu, const char *str, char **xpm, GtkSignalFunc sf, +GtkWidget *gaim_new_item_with_pixmap(GtkWidget *menu, const char *str, char **xpm, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod) { GtkWidget *menuitem; @@ -2473,7 +2473,7 @@ gtk_menu_append(GTK_MENU(menu), menuitem); if (sf) /* passing 1 is necessary so if we sign off closing the account editor doesn't exit */ - gtk_signal_connect(GTK_OBJECT(menuitem), "activate", sf, (void *)1); + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", sf, data); gtk_widget_show(menuitem); /* Create our container */ @@ -2568,7 +2568,16 @@ } } - +extern GtkWidget *debugbutton; +void clicked_debug (GtkWidget *widg, gpointer pntr) +{ + if (debugbutton) + gtk_button_clicked(GTK_BUTTON(debugbutton)); + else { + misc_options ^= OPT_MISC_DEBUG; + show_debug(); + } +} void show_buddy_list() { @@ -2624,30 +2633,30 @@ gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); gaim_new_item_with_pixmap(menu, _("Add A Buddy"), add_small_xpm, - GTK_SIGNAL_FUNC(add_buddy_callback), 'b', GDK_CONTROL_MASK, "Ctl+B"); + GTK_SIGNAL_FUNC(add_buddy_callback), NULL, 'b', GDK_CONTROL_MASK, "Ctl+B"); gaim_new_item_with_pixmap(menu, _("Join A Chat"), pounce_small_xpm, - GTK_SIGNAL_FUNC(chat_callback), 'c', GDK_CONTROL_MASK, "Ctl+C"); + GTK_SIGNAL_FUNC(chat_callback), NULL, 'c', GDK_CONTROL_MASK, "Ctl+C"); gaim_new_item_with_pixmap(menu, _("New Instant Message"), send_small_xpm, - GTK_SIGNAL_FUNC(show_im_dialog), 'i', GDK_CONTROL_MASK, "Ctl+I"); + GTK_SIGNAL_FUNC(show_im_dialog), NULL, 'i', GDK_CONTROL_MASK, "Ctl+I"); gaim_new_item_with_pixmap(menu, _("Get User Info"), search_small_xpm, - GTK_SIGNAL_FUNC(show_info_dialog), 'j', GDK_CONTROL_MASK, "Ctl+J"); + GTK_SIGNAL_FUNC(show_info_dialog), NULL, 'j', GDK_CONTROL_MASK, "Ctl+J"); gaim_separator(menu); gaim_new_item_with_pixmap(menu, _("Import Buddy List"), import_small_xpm, - GTK_SIGNAL_FUNC(import_callback), 0, 0, 0); + GTK_SIGNAL_FUNC(import_callback), NULL, 0, 0, 0); /*gaim_new_item_with_pixmap(menu, _("Export Buddy List"), export_small_xpm, GTK_SIGNAL_FUNC(show_export_dialog), 0, 0, 0); */ gaim_separator(menu); gaim_new_item_with_pixmap(menu, _("Signoff"), logout_menu_xpm, - GTK_SIGNAL_FUNC(signoff_all), 'd', GDK_CONTROL_MASK, "Ctl+D"); + GTK_SIGNAL_FUNC(signoff_all), (void*)1, 'd', GDK_CONTROL_MASK, "Ctl+D"); #ifndef USE_APPLET gaim_new_item_with_pixmap(menu, _("Quit"), exit_small_xpm, - GTK_SIGNAL_FUNC(do_quit), 'q', GDK_CONTROL_MASK, "Ctl+Q"); + GTK_SIGNAL_FUNC(do_quit), NULL, 'q', GDK_CONTROL_MASK, "Ctl+Q"); #else gaim_new_item_with_pixmap(menu, _("Close"), close_small_xpm, - GTK_SIGNAL_FUNC(applet_destroy_buddy), 'x', GDK_CONTROL_MASK, "Ctl+X"); + GTK_SIGNAL_FUNC(applet_destroy_buddy), NULL, 'x', GDK_CONTROL_MASK, "Ctl+X"); #endif menu = gtk_menu_new(); @@ -2657,12 +2666,12 @@ gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); awaymenu = gtk_menu_new(); - menuitem = gaim_new_item_with_pixmap(menu, _("Away"), away_small_xpm, NULL, 0, 0, 0); + menuitem = gaim_new_item_with_pixmap(menu, _("Away"), away_small_xpm, NULL, NULL, 0, 0, 0); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), awaymenu); do_away_menu(); bpmenu = gtk_menu_new(); - menuitem = gaim_new_item_with_pixmap(menu, _("Buddy Pounce"), pounce_small_xpm, NULL, 0, 0, 0); + menuitem = gaim_new_item_with_pixmap(menu, _("Buddy Pounce"), pounce_small_xpm, NULL, NULL, 0, 0, 0); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), bpmenu); do_bp_menu(); @@ -2670,30 +2679,30 @@ #ifndef NO_MULTI gaim_new_item_with_pixmap(menu, _("Accounts"), add_small_xpm, - GTK_SIGNAL_FUNC(account_editor), 'a', GDK_CONTROL_MASK, "Ctl+A"); + GTK_SIGNAL_FUNC(account_editor), NULL, 'a', GDK_CONTROL_MASK, "Ctl+A"); #endif protomenu = gtk_menu_new(); menuitem = - gaim_new_item_with_pixmap(menu, _("Protocol Actions"), prefs_small_xpm, NULL, 0, 0, 0); + gaim_new_item_with_pixmap(menu, _("Protocol Actions"), prefs_small_xpm, NULL, NULL, 0, 0, 0); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), protomenu); do_proto_menu(); gaim_new_item_with_pixmap(menu, _("Preferences"), prefs_small_xpm, - GTK_SIGNAL_FUNC(show_prefs), 'p', GDK_CONTROL_MASK, "Ctl+P"); + GTK_SIGNAL_FUNC(show_prefs), NULL, 'p', GDK_CONTROL_MASK, "Ctl+P"); gaim_new_item_with_pixmap(menu, _("View System Log"), prefs_small_xpm, - GTK_SIGNAL_FUNC(show_syslog), 0, 0, 0); + GTK_SIGNAL_FUNC(show_syslog), NULL, 0, 0, 0); gaim_separator(menu); #ifdef GAIM_PLUGINS - gaim_new_item_with_pixmap(menu, _("Plugins"), plugins_small_xpm, GTK_SIGNAL_FUNC(show_plugins), + gaim_new_item_with_pixmap(menu, _("Plugins"), plugins_small_xpm, GTK_SIGNAL_FUNC(show_plugins), NULL, 0, 0, 0); #endif #ifdef USE_PERL perlmenu = gtk_menu_new(); gtk_widget_show(perlmenu); - menuitem = gaim_new_item_with_pixmap(menu, _("Perl"), plugins_small_xpm, NULL, 0, 0, 0); + menuitem = gaim_new_item_with_pixmap(menu, _("Perl"), plugins_small_xpm, NULL, NULL, 0, 0, 0); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), perlmenu); gtk_widget_show(menuitem); menuitem = gtk_menu_item_new_with_label(_("Load Script")); @@ -2717,8 +2726,11 @@ gtk_menu_item_right_justify(GTK_MENU_ITEM(menuitem)); gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); - gaim_new_item_with_pixmap(menu, _("About Gaim"), about_small_xpm, show_about, GDK_F1, 0, NULL); - + gaim_new_item_with_pixmap(menu, _("Online Help"), add_small_xpm, GTK_SIGNAL_FUNC(open_url), WEBSITE"documentation.php", GDK_F1, 0, NULL); + gaim_new_item_with_pixmap(menu, _("Debug Window"), search_small_xpm, GTK_SIGNAL_FUNC(clicked_debug), NULL, 0, 0, NULL); + gaim_new_item_with_pixmap(menu, _("About Gaim"), about_small_xpm, GTK_SIGNAL_FUNC(show_about), NULL, GDK_F1, GDK_CONTROL_MASK, NULL); + + gtk_widget_show(menubar); vbox = gtk_vbox_new(FALSE, 0); Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.222 retrieving revision 1.223 diff -u -d -r1.222 -r1.223 --- prefs.c 29 Apr 2002 18:07:27 -0000 1.222 +++ prefs.c 4 May 2002 04:20:42 -0000 1.223 @@ -64,8 +64,8 @@ static GtkWidget *sounddialog = NULL; static GtkWidget *prefdialog = NULL; -static GtkWidget *debugbutton = NULL; static GtkWidget *tickerbutton = NULL; +GtkWidget *debugbutton = NULL; extern GtkWidget *tickerwindow; extern void BuddyTickerShow(); |
From: Jim S. <jse...@us...> - 2002-05-04 03:34:49
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv20793/src/protocols/jabber Modified Files: jabber.c Log Message: Fixed timezone stuff again. Maybe this'll do it? Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- jabber.c 3 May 2002 01:09:49 -0000 1.45 +++ jabber.c 4 May 2002 03:34:46 -0000 1.46 @@ -751,7 +751,6 @@ retval -= timezone; # endif #endif - ; } return retval; } |
From: Jim S. <jse...@us...> - 2002-05-04 03:34:49
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20793 Modified Files: configure.ac configure.in Log Message: Fixed timezone stuff again. Maybe this'll do it? Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- configure.ac 3 May 2002 01:09:49 -0000 1.62 +++ configure.ac 4 May 2002 03:34:46 -0000 1.63 @@ -260,6 +260,20 @@ AC_SUBST(XSS_LIBS) +AC_DEFUN(GC_TM_GMTOFF, +[AC_REQUIRE([AC_STRUCT_TM])dnl +AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], + ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) +if test "$ac_cv_struct_tm_gmtoff" = yes; then + AC_DEFINE(HAVE_TM_GMTOFF) +fi +]) + +GC_TM_GMTOFF + + dnl This was taken straight from X-Chat. dnl X-Chat is the greatest application ever, not only Index: configure.in =================================================================== RCS file: /cvsroot/gaim/gaim/configure.in,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- configure.in 3 May 2002 01:09:49 -0000 1.106 +++ configure.in 4 May 2002 03:34:46 -0000 1.107 @@ -257,6 +257,18 @@ fi AC_SUBST(XSS_LIBS) +AC_DEFUN(GC_TM_GMTOFF, +[AC_REQUIRE([AC_STRUCT_TM])dnl +AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], + ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) +if test "$ac_cv_struct_tm_gmtoff" = yes; then + AC_DEFINE(HAVE_TM_GMTOFF) +fi +]) + +GC_TM_GMTOFF dnl This was taken straight from X-Chat. |
From: Sean E. <sea...@us...> - 2002-05-04 02:06:27
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7106/src Modified Files: buddy.c Log Message: That was a bad idea--entirely my fault. We meant to remove this sooner. Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.309 retrieving revision 1.310 diff -u -d -r1.309 -r1.310 --- buddy.c 29 Apr 2002 18:07:27 -0000 1.309 +++ buddy.c 4 May 2002 02:06:24 -0000 1.310 @@ -1846,18 +1846,6 @@ gtk_container_add(GTK_CONTAINER(g->item), g->label); - style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(g->label))); - -// style->font = gdk_font_load("-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"); - - style->fg[0].red = 104 * 255; - style->fg[0].green = 20 * 255; - style->fg[0].blue = 20* 255; - - gtk_widget_set_style(GTK_WIDGET(g->label), style); - gtk_style_unref(style); - - shows = g_slist_insert(shows, g, pos); /* Rob does drugs - this is still evil, damn you becausse I SAID SO! */ |
From: Sean E. <sea...@us...> - 2002-05-03 23:59:03
|
Update of /cvsroot/gaim/gaim/m4 In directory usw-pr-cvs1:/tmp/cvs-serv18676/m4 Modified Files: Makefile.am Log Message: Jim forgot this. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/m4/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 27 Aug 2001 23:00:14 -0000 1.2 +++ Makefile.am 3 May 2002 23:58:59 -0000 1.3 @@ -1,3 +1,3 @@ EXTRA_DIST = gnome-x-checks.m4 gnome-gnorba-check.m4 \ gnome-pthread-check.m4 gnome.m4 gnome-orbit-check.m4 \ - esd.m4 artsc.m4 + esd.m4 artsc.m4 ac_var_timezone_externals.m4 |
From: Sean E. <sea...@us...> - 2002-05-03 23:19:56
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv10787/src/protocols/msn Modified Files: msn.c Log Message: No longer there. MSN Fix. Maybe. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- msn.c 3 May 2002 19:22:44 -0000 1.74 +++ msn.c 3 May 2002 23:19:53 -0000 1.75 @@ -2198,58 +2198,62 @@ if (!md->permit && !md->deny) return; - s = g_slist_nth(gc->permit, g_slist_length(md->permit)); - while (s) { - char *who = s->data; - s = s->next; - if (!strchr(who, '@')) { - t = g_slist_append(t, who); - continue; + if (md->permit) { + s = g_slist_nth(gc->permit, g_slist_length(md->permit)); + while (s) { + char *who = s->data; + s = s->next; + if (!strchr(who, '@')) { + t = g_slist_append(t, who); + continue; + } + g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who); + if (msn_write(md->fd, buf, strlen(buf)) < 0) { + hide_login_progress(gc, "Write error"); + signoff(gc); + return; + } } - g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who); - if (msn_write(md->fd, buf, strlen(buf)) < 0) { - hide_login_progress(gc, "Write error"); - signoff(gc); - return; + while (t) { + char *who = t->data; + gc->permit = g_slist_remove(gc->permit, who); + g_free(who); + t = t->next; } - } - while (t) { - char *who = t->data; - gc->permit = g_slist_remove(gc->permit, who); - g_free(who); - t = t->next; - } - if (t) - g_slist_free(t); + if (t) + g_slist_free(t); t = NULL; g_slist_free(md->permit); md->permit = NULL; - - s = g_slist_nth(gc->deny, g_slist_length(md->deny)); - while (s) { - char *who = s->data; - s = s->next; - if (!strchr(who, '@')) { - t = g_slist_append(t, who); - continue; + } + + if (md->deny) { + s = g_slist_nth(gc->deny, g_slist_length(md->deny)); + while (s) { + char *who = s->data; + s = s->next; + if (!strchr(who, '@')) { + t = g_slist_append(t, who); + continue; + } + g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, who, who); + if (msn_write(md->fd, buf, strlen(buf)) < 0) { + hide_login_progress(gc, "Write error"); + signoff(gc); + return; + } } - g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, who, who); - if (msn_write(md->fd, buf, strlen(buf)) < 0) { - hide_login_progress(gc, "Write error"); - signoff(gc); - return; + while (t) { + char *who = t->data; + gc->deny = g_slist_remove(gc->deny, who); + g_free(who); + t = t->next; } - } - while (t) { - char *who = t->data; - gc->deny = g_slist_remove(gc->deny, who); - g_free(who); - t = t->next; - } - if (t) - g_slist_free(t); + if (t) + g_slist_free(t); g_slist_free(md->deny); md->deny = NULL; + } } static void msn_add_permit(struct gaim_connection *gc, char *who) |
From: Sean E. <sea...@us...> - 2002-05-03 20:08:05
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv24906 Modified Files: ChangeLog Log Message: (16:00:59) Ari Pollak: oh and you spelled my name wrong in the changelog :) Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.466 retrieving revision 1.467 diff -u -d -r1.466 -r1.467 --- ChangeLog 3 May 2002 19:49:24 -0000 1.466 +++ ChangeLog 3 May 2002 20:03:05 -0000 1.467 @@ -9,7 +9,7 @@ * Get Info from menu multiple-account-aware (thanks Brian Bernas) * Hide and unhide functions for the filectl plugin. - (Thanks, Ari Pollack) + (Thanks, Ari Pollak) version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-03 19:49:27
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv21134/plugins Modified Files: filectl.c Log Message: Ari Pollack did this. Index: filectl.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/filectl.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- filectl.c 16 Mar 2002 05:57:26 -0000 1.9 +++ filectl.c 3 May 2002 19:49:24 -0000 1.10 @@ -1,5 +1,6 @@ -#define GAIM_PLUGINS +#include "config.h" #include "gaim.h" +#include "applet.h" #include <gtk/gtk.h> #include <stdlib.h> @@ -88,6 +89,10 @@ a.name[0] = 0; do_away_message(NULL, &a); free(arg1); + } else if (!strncasecmp(command, "hide", 4)) { + hide_buddy_list(); + } else if (!strncasecmp(command, "unhide", 6)) { + unhide_buddy_list(); } else if (!strncasecmp(command, "back", 4)) { do_im_back(); } else if (!strncasecmp(command, "quit", 4)) { |
From: Sean E. <sea...@us...> - 2002-05-03 19:49:27
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv21134 Modified Files: ChangeLog Log Message: Ari Pollack did this. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.465 retrieving revision 1.466 diff -u -d -r1.465 -r1.466 --- ChangeLog 3 May 2002 19:46:07 -0000 1.465 +++ ChangeLog 3 May 2002 19:49:24 -0000 1.466 @@ -8,6 +8,8 @@ * Formatting of incoming MSN messages * Get Info from menu multiple-account-aware (thanks Brian Bernas) + * Hide and unhide functions for the filectl plugin. + (Thanks, Ari Pollack) version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-03 19:46:10
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20259/src Modified Files: dialogs.c Log Message: click81's patch for get_info from the menu. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.318 retrieving revision 1.319 diff -u -d -r1.318 -r1.319 --- dialogs.c 20 Apr 2002 08:10:12 -0000 1.318 +++ dialogs.c 3 May 2002 19:46:07 -0000 1.319 @@ -90,7 +90,6 @@ GdkColor fgcolor; static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */ -static GtkWidget *infodialog = NULL; static GList *dialogwindows = NULL; static GtkWidget *importdialog; static struct gaim_connection *importgc; @@ -186,6 +185,14 @@ GtkWidget *window; GtkWidget *text; }; + +struct getuserinfo { + GtkWidget *window; + GtkWidget *entry; + GtkWidget *account; + struct gaim_connection *gc; +}; + static GSList *info_dlgs = NULL; static struct info_dlg *find_info_dlg(struct gaim_connection *gc, char *who) @@ -321,9 +328,6 @@ if (dest == imdialog) imdialog = NULL; - if (dest == infodialog) - infodialog = NULL; - if (dest == importdialog) { importdialog = NULL; importgc = NULL; @@ -363,11 +367,6 @@ imdialog = NULL; } - if (infodialog) { - destroy_dialog(NULL, infodialog); - infodialog = NULL; - } - if (importdialog) { destroy_dialog(NULL, importdialog); importdialog = NULL; @@ -605,13 +604,12 @@ g_free(who); } -static void do_info(GtkWidget *widget, GtkWidget *infoentry) +static void do_info(GtkWidget *widget, struct getuserinfo *info) { char *who; - who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(infoentry)))); - destroy_dialog(NULL, infodialog); - infodialog = NULL; + who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(info->entry)))); + destroy_dialog(NULL, info->window); if (!g_strcasecmp(who, "")) { g_free(who); @@ -619,8 +617,8 @@ } /* what do we want to do about this case? */ - if (connections) - serv_get_info(connections->data, who); + if (info->gc) + serv_get_info(info->gc, who); g_free(who); } @@ -727,67 +725,109 @@ gtk_widget_show_all(imdialog); } +void show_info_select_account(GtkObject *w, struct gaim_connection *gc) +{ + struct getuserinfo *info = gtk_object_get_user_data(w); + info->gc = gc; +} + void show_info_dialog() { GtkWidget *mainbox; GtkWidget *frame; - GtkWidget *fbox; + GtkWidget *table; GtkWidget *bbox; GtkWidget *button; - GtkWidget *infoentry; GtkWidget *label; + GtkWidget *menu, *opt; + char buf[2048]; + GSList *g = connections; + struct gaim_connection *c; - if (!infodialog) { + struct getuserinfo *info = g_new0(struct getuserinfo, 1); + info->gc = connections->data; - GAIM_DIALOG(infodialog); - gtk_window_set_wmclass(GTK_WINDOW(infodialog), "infodialog", "Gaim"); - gtk_window_set_policy(GTK_WINDOW(infodialog), FALSE, TRUE, TRUE); - gtk_widget_realize(infodialog); + GAIM_DIALOG(info->window); + gtk_window_set_wmclass(GTK_WINDOW(info->window), "infodialog", "Gaim"); + gtk_window_set_policy(GTK_WINDOW(info->window), FALSE, TRUE, TRUE); + gtk_widget_realize(info->window); - mainbox = gtk_vbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); - gtk_container_add(GTK_CONTAINER(infodialog), mainbox); + mainbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); + gtk_container_add(GTK_CONTAINER(info->window), mainbox); - frame = gtk_frame_new(_("Get User Info")); - gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); + frame = gtk_frame_new(_("Get User Info")); + gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); - fbox = gtk_hbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); - gtk_container_add(GTK_CONTAINER(frame), fbox); + table = gtk_table_new(2, 2, FALSE); + gtk_table_set_row_spacings(GTK_TABLE(table), 5); + gtk_table_set_col_spacings(GTK_TABLE(table), 5); + gtk_container_set_border_width(GTK_CONTAINER(table), 5); + gtk_container_add(GTK_CONTAINER(frame), table); - label = gtk_label_new(_("User:")); - gtk_box_pack_start(GTK_BOX(fbox), label, FALSE, FALSE, 0); + label = gtk_label_new(_("User:")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); + gtk_widget_show(label); + + info->entry = gtk_entry_new(); + gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1); + + if (connections->next) { + + label = gtk_label_new(_("Account:")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); gtk_widget_show(label); - infoentry = gtk_entry_new(); - gtk_box_pack_start(GTK_BOX(fbox), infoentry, TRUE, TRUE, 0); + info->account = gtk_option_menu_new(); + gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2); - /* Handle closes right */ - gtk_signal_connect(GTK_OBJECT(infoentry), "activate", - GTK_SIGNAL_FUNC(do_info), infoentry); - gtk_signal_connect(GTK_OBJECT(infodialog), "destroy", - GTK_SIGNAL_FUNC(destroy_dialog), infodialog); + menu = gtk_menu_new(); - /* Buttons */ - bbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); + while (g) { + c = (struct gaim_connection *)g->data; + g_snprintf(buf, sizeof(buf), "%s (%s)", c->username, c->prpl->name()); + opt = gtk_menu_item_new_with_label(buf); + gtk_object_set_user_data(GTK_OBJECT(opt), info); - button = picture_button(infodialog, _("Cancel"), cancel_xpm); - gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(destroy_dialog), infodialog); + gtk_signal_connect(GTK_OBJECT(opt), "activate", + GTK_SIGNAL_FUNC(show_info_select_account), c); - button = picture_button(infodialog, _("OK"), ok_xpm); - gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_info), infoentry); + gtk_menu_append(GTK_MENU(menu), opt); + gtk_widget_show(opt); - /* Finish up */ - gtk_window_set_title(GTK_WINDOW(infodialog), _("Gaim - Get User Info")); - gtk_widget_grab_focus(infoentry); + g = g->next; + } - aol_icon(infodialog->window); + gtk_widget_show(menu); + gtk_option_menu_set_menu(GTK_OPTION_MENU(info->account), menu); + gtk_widget_show(info->account); } - gtk_widget_show_all(infodialog); + + /* Handle closes right */ + gtk_signal_connect(GTK_OBJECT(info->entry), "activate", + GTK_SIGNAL_FUNC(do_info), info); + gtk_signal_connect(GTK_OBJECT(info->window), "destroy", + GTK_SIGNAL_FUNC(destroy_dialog), info->window); + + /* Buttons */ + bbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); + + button = picture_button(info->window, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(destroy_dialog), info->window); + + button = picture_button(info->window, _("OK"), ok_xpm); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_info), info); + + /* Finish up */ + gtk_window_set_title(GTK_WINDOW(info->window), _("Gaim - Get User Info")); + gtk_widget_grab_focus(info->entry); + + aol_icon(info->window->window); + gtk_widget_show_all(info->window); } |
From: Sean E. <sea...@us...> - 2002-05-03 19:46:10
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20259 Modified Files: ChangeLog Log Message: click81's patch for get_info from the menu. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.464 retrieving revision 1.465 diff -u -d -r1.464 -r1.465 --- ChangeLog 3 May 2002 19:22:44 -0000 1.464 +++ ChangeLog 3 May 2002 19:46:07 -0000 1.465 @@ -6,6 +6,8 @@ * Better applet transparency * Option to raise buddy list on signons/signoffs * Formatting of incoming MSN messages + * Get Info from menu multiple-account-aware (thanks + Brian Bernas) version 0.57 (04/25/2002): * New authorization method for Yahoo! |
From: Sean E. <sea...@us...> - 2002-05-03 19:24:21
|
Update of /cvsroot/gaim/gaim/doc In directory usw-pr-cvs1:/tmp/cvs-serv13133/doc Modified Files: gaim.1 Log Message: (15:04:40) dolson: I am running Gaim 0.57, but the man page says version 0.56 (15:05:02) dolson: Is that fixed in CVS? (15:05:10) LSchiere: nope (15:05:25) dolson: You guys and your sloppy programming... Man... I should run Trillian in Wine... Index: gaim.1 =================================================================== RCS file: /cvsroot/gaim/gaim/doc/gaim.1,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- gaim.1 30 Mar 2002 10:22:29 -0000 1.51 +++ gaim.1 3 May 2002 19:24:19 -0000 1.52 @@ -21,7 +21,7 @@ .\" USA. .TH gaim 1 .SH NAME -Gaim v0.56 \- Instant Messaging client +Gaim v0.58 \- Instant Messaging client .SH SYNOPSIS .TP 5 \fBgaim \fI[options]\fR |
From: Sean E. <sea...@us...> - 2002-05-03 19:22:49
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv11812/src/protocols/msn Modified Files: msn.c Log Message: An MSN mail checking fix, and formatting of incoming msn messages. Not yet a privacy fix, or initiating group chats--I'll do those later tonight. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- msn.c 26 Apr 2002 01:33:35 -0000 1.73 +++ msn.c 3 May 2002 19:22:44 -0000 1.74 @@ -354,34 +354,34 @@ char buf[MSN_BUF_LEN]; struct msn_data *md = gc->proto_data; - g_snprintf(buf, sizeof(buf), "URL %d INBOX\r\n", ++md->trId); - - if (msn_write(md->fd, buf, strlen(buf)) < 0) { - return; - } - - debug_printf("\n"); - - snprintf(login_url, sizeof(login_url), "%s", md->passport); + if (!md->passport) { + g_snprintf(buf, sizeof(buf), "URL %d INBOX\r\n", ++md->trId); - if (strstr(data, "Content-Type: text/x-msmsgsinitialemailnotification;")) { - char *x = strstr(data, "Inbox-Unread:"); - if (!x) return; - x += strlen("Inbox-Unread: "); - connection_has_mail(gc, atoi(x), NULL, NULL, login_url); - } else if (strstr(data, "Content-Type: text/x-msmsgsemailnotification;")) { - char *from = strstr(data, "From:"); - char *subject = strstr(data, "Subject:"); - char *x; - if (!from || !subject) { - connection_has_mail(gc, 1, NULL, NULL, login_url); + if (msn_write(md->fd, buf, strlen(buf)) < 0) { return; } - from += strlen("From: "); - x = strstr(from, "\r\n"); *x = 0; - subject += strlen("Subject: "); - x = strstr(subject, "\r\n"); *x = 0; - connection_has_mail(gc, -1, from, subject, login_url); + } else { + g_snprintf(login_url, sizeof(login_url), "%s", md->passport); + + if (strstr(data, "Content-Type: text/x-msmsgsinitialemailnotification;")) { + char *x = strstr(data, "Inbox-Unread:"); + if (!x) return; + x += strlen("Inbox-Unread: "); + connection_has_mail(gc, atoi(x), NULL, NULL, login_url); + } else if (strstr(data, "Content-Type: text/x-msmsgsemailnotification;")) { + char *from = strstr(data, "From:"); + char *subject = strstr(data, "Subject:"); + char *x; + if (!from || !subject) { + connection_has_mail(gc, 1, NULL, NULL, login_url); + return; + } + from += strlen("From: "); + x = strstr(from, "\r\n"); *x = 0; + subject += strlen("Subject: "); + x = strstr(subject, "\r\n"); *x = 0; + connection_has_mail(gc, -1, from, subject, login_url); + } } } @@ -572,9 +572,74 @@ return 1; } +static void msn_unescape(char *text) { + char *cpy = g_strdup(text); + char *cur = cpy; + int c = 0; + + + while (*cur) { + if (*cur == '%') { + if (sscanf (cur, "%%%x;", &c) == 1 && c != 0) { + *text = c; + cur = cur + 3; + } + } else { + *text = *cur; + cur++; + } + text++; + } + *text = 0; + g_free(cpy); +} + +static char *msn_parse_format(char *mime) +{ + char *cur; + GString *ret = g_string_new(NULL); + char colors[3]; + + cur = strstr(mime, "FN="); + if (cur && (*(cur = cur + 3) != ';')) { + ret = g_string_append(ret, "<FONT FACE=\""); + while (*cur && *cur != ';') { + ret = g_string_append_c(ret, *cur); + cur++; + } + ret = g_string_append(ret, "\">"); + } + + cur = strstr(mime, "EF="); + if (cur && (*(cur = cur + 3) != ';')) { + while (*cur && *cur != ';') { + ret = g_string_append_c(ret, '<'); + ret = g_string_append_c(ret, *cur); + ret = g_string_append_c(ret, '>'); + cur++; + } + } + + cur = strstr(mime, "CO="); + if (cur && (*(cur = cur + 3) != ';')) { + if (sscanf (cur, "%x;", (int*)(&colors)) == 1) { + char tag[MSN_BUF_LEN]; + g_snprintf(tag, sizeof(tag), "<FONT COLOR=\"#%02hhx%02hhx%02hhx\">", colors[0], colors[1], colors[2]); + ret = g_string_append(ret, tag); + } + } + + msn_unescape(ret->str); + cur = ret->str; + g_string_free(ret, FALSE); + return cur; +} + + static void msn_process_switch_msg(struct msn_switchboard *ms, char *msg) { - char *content, *agent, *utf; + char *content, *agent, *format, *utf; + char *message = NULL; int flags = 0; agent = strstr(msg, "User-Agent: "); @@ -582,6 +647,14 @@ if (!g_strncasecmp(agent, "User-Agent: Gaim", strlen("User-Agent: Gaim"))) flags |= IM_FLAG_GAIMUSER; } + + format = strstr(msg, "X-MMS-IM-Format: "); + if (format) { + format = msn_parse_format(format); + } else { + format = NULL; + } + content = strstr(msg, "Content-Type: "); if (!content) return; @@ -594,6 +667,9 @@ } else if (!g_strncasecmp(content, "Content-Type: text/plain", strlen("Content-Type: text/plain"))) { + + + char *skiphead; skiphead = strstr(msg, "\r\n\r\n"); if (!skiphead || !skiphead[4]) { @@ -603,12 +679,24 @@ utf = utf8_to_str(skiphead); strip_linefeed(utf); + if (format) { + int len = strlen(utf) + strlen(format) + 1; + message = g_malloc(len); + g_snprintf(message, len, "%s%s", format, utf); + } else { + message = utf; + } + if (ms->chat) - serv_got_chat_in(ms->gc, ms->chat->id, ms->msguser, flags, utf, time(NULL)); + serv_got_chat_in(ms->gc, ms->chat->id, ms->msguser, flags, message, time(NULL)); else - serv_got_im(ms->gc, ms->msguser, utf, flags, time(NULL), -1); + serv_got_im(ms->gc, ms->msguser, message, flags, time(NULL), -1); - g_free(utf); + g_free(message); + if (format) { + g_free(format); + g_free(utf); + } } } @@ -618,7 +706,7 @@ char buf[MSN_BUF_LEN]; int cont = 1; int len; - + /* This is really stupid and I hate to put this here. */ if (ms->fd != source) ms->fd = source; @@ -1174,7 +1262,11 @@ strcat(sendbuf, buf2); } - md->passport = tmpnam(NULL); + if (md->passport) { + unlink(md->passport); + free(md->passport); + } + md->passport = tempnam(NULL, NULL); fd = fopen(md->passport, "w"); fprintf(fd, "<html>\n"); @@ -1686,6 +1778,10 @@ g_free(md->rxqueue); if (md->msg) g_free(md->msguser); + if (md->passport) { + unlink(md->passport); + free(md->passport); + } while (md->switches) msn_kill_switch(md->switches->data); while (md->fl) { |