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: Eric W. <war...@us...> - 2001-12-14 18:34:10
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv17689 Modified Files: gtkimhtml.c Log Message: whoops Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- gtkimhtml.c 2001/12/11 06:29:58 1.90 +++ gtkimhtml.c 2001/12/14 18:34:06 1.91 @@ -3061,18 +3061,18 @@ } break; case 42: /* BODY (opt) */ - { - gchar *bgcolor = gtk_imhtml_get_html_opt (tag, "BGCOLOR="); - if (bgcolor) { - GdkColor *tmp = gtk_imhtml_get_color (bgcolor); - g_free (bgcolor); - if (tmp) { - NEW_BIT (NEW_TEXT_BIT); - bg = tmp; - UPDATE_BG_COLORS; + if (!(options & GTK_IMHTML_NO_COLOURS)) { + gchar *bgcolor = gtk_imhtml_get_html_opt (tag, "BGCOLOR="); + if (bgcolor) { + GdkColor *tmp = gtk_imhtml_get_color (bgcolor); + g_free (bgcolor); + if (tmp) { + NEW_BIT (NEW_TEXT_BIT); + bg = tmp; + UPDATE_BG_COLORS; + } } } - } break; case 43: /* A (opt) */ { |
From: Eric W. <war...@us...> - 2001-12-14 18:24:12
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv15631/protocols/gg Modified Files: libgg.h Log Message: this looks particularly evil. Index: libgg.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- libgg.h 2001/12/05 09:48:56 1.6 +++ libgg.h 2001/12/14 18:24:10 1.7 @@ -164,12 +164,20 @@ unsigned short remote_port; /* port, na którym s³ucha klient */ unsigned long version; /* == 0x0b */ unsigned short dunno2; /* znowu port? */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; struct gg_status { uin_t uin; /* numerek */ unsigned long status; /* nowy stan */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; enum { GG_EVENT_NONE = 0, @@ -383,13 +391,21 @@ struct gg_header { unsigned long type; /* typ pakietu */ unsigned long length; /* d³ugo¶æ reszty pakietu */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_WELCOME 0x0001 struct gg_welcome { unsigned long key; /* klucz szyfrowania has³a */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_LOGIN 0x000c @@ -400,7 +416,11 @@ unsigned long dunno; /* == 0x0b */ unsigned long local_ip; /* mój adres ip */ unsigned short local_port; /* port, na którym s³ucham */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_LOGIN_OK 0x0003 @@ -417,14 +437,22 @@ struct gg_new_status { unsigned long status; /* na jaki zmieniæ? */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_NOTIFY 0x0010 struct gg_notify { uin_t uin; /* numerek danej osoby */ char dunno1; /* == 3 */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */ @@ -436,7 +464,11 @@ struct gg_add_remove { uin_t uin; /* numerek */ char dunno1; /* == 3 */ -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_STATUS 0x0002 @@ -453,7 +485,11 @@ unsigned long recipient; unsigned long seq; unsigned long msgclass; -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_SEND_MSG_ACK 0x0005 @@ -464,7 +500,11 @@ unsigned long status; unsigned long recipient; unsigned long seq; -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_RECV_MSG 0x000a @@ -473,7 +513,11 @@ unsigned long seq; unsigned long time; unsigned long msgclass; -} __attribute__ ((packed)); +} +#ifdef __GNUC__ +__attribute__ ((packed)) +#endif +; #define GG_PING 0x0008 |
From: Eric W. <war...@us...> - 2001-12-14 18:08:27
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv11546 Modified Files: buddy.c ui.h Log Message: thanks Tim Mooney Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.280 retrieving revision 1.281 diff -u -d -r1.280 -r1.281 --- buddy.c 2001/12/08 09:48:51 1.280 +++ buddy.c 2001/12/14 18:08:24 1.281 @@ -464,7 +464,7 @@ gtk_label_set_text(GTK_LABEL(gs->label), buf); } -void update_num_groups() +void update_num_groups(void) { GSList *s = shows; struct group_show *g; @@ -1732,7 +1732,7 @@ gtk_widget_show(g->label); shows = g_slist_insert(shows, g, pos); - update_num_groups(g); + update_num_group(g); return g; } Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ui.h 2001/12/08 09:48:52 1.25 +++ ui.h 2001/12/14 18:08:24 1.26 @@ -305,7 +305,7 @@ extern void update_button_pix(); extern void toggle_show_empty_groups(); extern void update_all_buddies(); -extern void update_num_groups(); +extern void update_num_groups(void); extern void show_buddy_list(); extern void refresh_buddy_window(); extern void signoff_all(); |
From: Eric W. <war...@us...> - 2001-12-14 06:30:20
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv18242 Modified Files: NEWS Log Message: still the 13th over here... ;) Index: NEWS =================================================================== RCS file: /cvsroot/gaim/gaim/NEWS,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- NEWS 2001/12/14 06:28:03 1.104 +++ NEWS 2001/12/14 06:30:16 1.105 @@ -1,7 +1,9 @@ -=[ Gaim ]=- The Pimpin' Penguin AIM Clone That's Good For The Soul! -version 0.50 (12/14/2001): +version 0.50 (12/13/2001): Rob: I am tired. Tonight was weird. Bleh!!!! + + Eric: I second that. 0.49 (11/29/2001): Rob: *still mamboing* |
From: Rob F. <rob...@us...> - 2001-12-14 06:28:06
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv17828 Modified Files: ChangeLog NEWS gaim.spec.in Log Message: Yo Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.373 retrieving revision 1.374 diff -u -d -r1.373 -r1.374 --- ChangeLog 2001/12/10 02:47:51 1.373 +++ ChangeLog 2001/12/14 06:28:03 1.374 @@ -1,6 +1,6 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! -version 0.50: +version 0.50 (12/14/2001): * Updated polish translation (Thanks Przemyslaw Sulek) * Able to import GnomeICU contact lists * Galeon as browser option (Thanks Rob McQueen) Index: NEWS =================================================================== RCS file: /cvsroot/gaim/gaim/NEWS,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- NEWS 2001/11/30 07:59:36 1.103 +++ NEWS 2001/12/14 06:28:03 1.104 @@ -1,6 +1,7 @@ -=[ Gaim ]=- The Pimpin' Penguin AIM Clone That's Good For The Soul! -version 0.50: +version 0.50 (12/14/2001): + Rob: I am tired. Tonight was weird. Bleh!!!! 0.49 (11/29/2001): Rob: *still mamboing* Index: gaim.spec.in =================================================================== RCS file: /cvsroot/gaim/gaim/gaim.spec.in,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- gaim.spec.in 2001/12/09 13:18:58 1.32 +++ gaim.spec.in 2001/12/14 06:28:03 1.33 @@ -99,6 +99,15 @@ rm -r $RPM_BUILD_ROOT %changelog +* Thu Dec 13 2001 Rob Flynn <ro...@ma...> (0.50 release) +- Updated polish translation (Thanks Przemyslaw Sulek) +- Able to import GnomeICU contact lists +- Galeon as browser option (Thanks Rob McQueen) +- IRC /list, /invite (Thanks Sean Egan) +- Added swedish translation (Thanks Christian Rose) +- Option to have IMs and Chats tabbed in same window +- Finally put the lagmeter plugin out of its misery and removed it. (/me dances on its grave.) + * Thu Nov 29 2001 Rob Flynn <ro...@ma...> (0.49 release) - Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) - Confirm before removing buddies |
From: Eric W. <war...@us...> - 2001-12-13 01:35:19
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv1461 Modified Files: buddy_chat.c Log Message: huh. Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- buddy_chat.c 2001/12/08 10:34:23 1.138 +++ buddy_chat.c 2001/12/13 01:35:16 1.139 @@ -1113,7 +1113,7 @@ if ((convo_options & OPT_CONVO_COMBINE) && (im_options & OPT_IM_ONE_WINDOW)) all_convos = all_chats; gtk_window_set_wmclass(GTK_WINDOW(win), "buddy_chat", "Gaim"); - gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); + gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, FALSE); gtk_container_border_width(GTK_CONTAINER(win), 0); gtk_widget_realize(win); aol_icon(win->window); |
From: Eric W. <war...@us...> - 2001-12-12 23:45:20
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv9598 Modified Files: yahoo.c Log Message: they use incredibly stupid formatting at work Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- yahoo.c 2001/12/12 12:58:37 1.26 +++ yahoo.c 2001/12/12 23:45:17 1.27 @@ -777,8 +777,8 @@ return "Stepped Out"; case YAHOO_STATUS_INVISIBLE: return "Invisible"; - default: - return "Online"; + default: + return "Online"; } } |
From: Eric W. <war...@us...> - 2001-12-12 12:58:41
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv9536/protocols/yahoo Modified Files: yahoo.c Log Message: the workers are going home Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- yahoo.c 2001/12/11 16:37:07 1.25 +++ yahoo.c 2001/12/12 12:58:37 1.26 @@ -474,7 +474,7 @@ l = l->next; } - if (pkt->status == 1) { + if (pkt->status <= 1) { char *m; int i, j; strip_linefeed(msg); |
From: Eric W. <war...@us...> - 2001-12-11 16:57:32
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv2301 Modified Files: conversation.c Log Message: ii''mm aa ffuucckkiinngg mmoorroonn.. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.316 retrieving revision 1.317 diff -u -d -r1.316 -r1.317 --- conversation.c 2001/12/11 10:35:46 1.316 +++ conversation.c 2001/12/11 16:57:29 1.317 @@ -106,7 +106,7 @@ gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-o)))", mrt_xpm); gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-O)))", mrt_xpm); gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), "8-|)", download_xpm); - gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-])", farted_xpm); + gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-]", farted_xpm); } void quiet_set(GtkWidget *tb, int state) |
From: Eric W. <war...@us...> - 2001-12-11 16:37:10
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv28503/protocols/yahoo Modified Files: yahoo.c Log Message: neasdgfjasiasldngp Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- yahoo.c 2001/12/11 08:24:13 1.24 +++ yahoo.c 2001/12/11 16:37:07 1.25 @@ -777,9 +777,9 @@ return "Stepped Out"; case YAHOO_STATUS_INVISIBLE: return "Invisible"; + default: + return "Online"; } - - return "Online"; } static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) @@ -793,6 +793,8 @@ if (!(b->uc & UC_UNAVAILABLE)) return NULL; + if (b->uc >> 1 == YAHOO_STATUS_IDLE) + return NULL; pbm = g_new0(struct proto_buddy_menu, 1); if ((b->uc >> 1) != YAHOO_STATUS_CUSTOM) |
From: Eric W. <war...@us...> - 2001-12-11 10:37:36
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv32007 Modified Files: farted.xpm Log Message: la la al Index: farted.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/farted.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- farted.xpm 2001/12/11 10:35:46 1.1 +++ farted.xpm 2001/12/11 10:37:32 1.2 @@ -1,5 +1,5 @@ /* XPM */ -static char * farted2_xpm[] = { +static char * farted_xpm[] = { "19 19 10 1", " c None", ". c #000000", |
From: Eric W. <war...@us...> - 2001-12-11 10:35:49
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv31320/src Modified Files: conversation.c Log Message: t h i s i s n o t a t e s t . t h i s i s n o t a t e s t . t h i s i s n o t a t e s t . Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.315 retrieving revision 1.316 diff -u -d -r1.315 -r1.316 --- conversation.c 2001/12/08 10:03:38 1.315 +++ conversation.c 2001/12/11 10:35:46 1.316 @@ -59,6 +59,7 @@ #include "pixmaps/crazy4.xpm" #include "pixmaps/mrt.xpm" #include "pixmaps/download.xpm" +#include "pixmaps/farted.xpm" static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; @@ -105,6 +106,7 @@ gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-o)))", mrt_xpm); gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-O)))", mrt_xpm); gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), "8-|)", download_xpm); + gtk_imhtml_associate_smiley(GTK_IMHTML(imhtml), ":-])", farted_xpm); } void quiet_set(GtkWidget *tb, int state) |
From: Eric W. <war...@us...> - 2001-12-11 10:35:49
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv31320/pixmaps Modified Files: Makefile.am Added Files: farted.xpm Log Message: t h i s i s n o t a t e s t . t h i s i s n o t a t e s t . t h i s i s n o t a t e s t . --- NEW FILE: farted.xpm --- /* XPM */ static char * farted2_xpm[] = { "19 19 10 1", " c None", ". c #000000", "+ c #CCCC00", "@ c #FFFF00", "# c #D8D83F", "$ c #666633", "% c #FFFFFF", "& c #FFCC00", "* c #FF9900", "= c #999933", " ....... ", " ..+@@@@@+.. ", " .+@@@@@@@@@+. ", " .@@@@@@@@@@@@@. ", " .+@@@.@@@@@.@@@+. ", " .@@@.@@@@@@@.@@@. ", ".#@@.$..@@@..$.@@+.", ".@@.$%.%.@.%.%$.@@.", ".@@@$%.%.@.%.%$@@@.", ".@@@&.%%.@.%%.&@@@.", ".@&&&&..@@@..&&&@@.", ".@&&**&@@@@@&**&&@.", ".+&****&@@@&****&+.", " .&&*..&@@@&..*&&. ", " .&&&=&.....&=&&&. ", " .&&&@@@@@@@&&&. ", " .+*@@***@@*+. ", " ..+@@@@@+.. ", " ....... "}; Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- Makefile.am 2001/11/20 07:20:05 1.60 +++ Makefile.am 2001/12/11 10:35:46 1.61 @@ -32,6 +32,7 @@ download.xpm \ embarrassed.xpm \ exit_small.xpm \ + farted.xpm \ fgcolor.xpm \ fontface.xpm \ fontface2.xpm \ |
From: Eric W. <war...@us...> - 2001-12-11 08:24:16
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv32442/protocols/yahoo Modified Files: yahoo.c Log Message: handle weird cases... ? Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- yahoo.c 2001/12/08 09:48:52 1.23 +++ yahoo.c 2001/12/11 08:24:13 1.24 @@ -396,9 +396,11 @@ gpointer val = g_hash_table_lookup(yd->hash, name); if (val) { g_free(val); - g_hash_table_insert(yd->hash, name, g_strdup(msg)); + g_hash_table_insert(yd->hash, name, + msg ? g_strdup(msg) : g_malloc0(1)); } else - g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg)); + g_hash_table_insert(yd->hash, g_strdup(name), + msg ? g_strdup(msg) : g_malloc0(1)); } break; case 60: /* no clue */ @@ -537,9 +539,11 @@ gpointer val = g_hash_table_lookup(yd->hash, name); if (val) { g_free(val); - g_hash_table_insert(yd->hash, name, g_strdup(msg)); + g_hash_table_insert(yd->hash, name, + msg ? g_strdup(msg) : g_malloc0(1)); } else - g_hash_table_insert(yd->hash, g_strdup(name), g_strdup(msg)); + g_hash_table_insert(yd->hash, g_strdup(name), + msg ? g_strdup(msg) : g_malloc0(1)); } } } @@ -771,9 +775,11 @@ return "Out To Lunch"; case YAHOO_STATUS_STEPPEDOUT: return "Stepped Out"; - default: - return NULL; + case YAHOO_STATUS_INVISIBLE: + return "Invisible"; } + + return "Online"; } static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) |
From: Eric W. <war...@us...> - 2001-12-11 07:18:13
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv20058 Modified Files: chatlist.c Log Message: you should not be using this plugin. Index: chatlist.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/chatlist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- chatlist.c 2001/11/07 22:25:38 1.7 +++ chatlist.c 2001/12/11 07:18:10 1.8 @@ -209,7 +209,7 @@ static void refresh_list(GtkWidget *w, gpointer *m) { - grab_url("http://www.aol.com/community/chat/allchats.html", FALSE, ref_list_callback, NULL); + grab_url("http://www.aim.com/community/chats.adp", FALSE, ref_list_callback, NULL); } static void add_chat(GtkWidget *w, gpointer *m) |
From: Eric W. <war...@us...> - 2001-12-11 06:30:01
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv10920 Modified Files: gtkimhtml.c Log Message: don't include the nul character. that's bad. Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- gtkimhtml.c 2001/12/09 10:55:24 1.89 +++ gtkimhtml.c 2001/12/11 06:29:58 1.90 @@ -2835,7 +2835,7 @@ gchar amp; - int smilelen; + gint smilelen; GList *newbits = NULL; @@ -3144,8 +3144,7 @@ pos++; } else if (gtk_imhtml_is_smiley (imhtml, c, &smilelen)) { NEW_BIT (NEW_TEXT_BIT); - g_snprintf (ws, smilelen + 1, "%s", c); - wpos = smilelen + 1; + wpos = g_snprintf (ws, smilelen + 1, "%s", c); NEW_BIT (NEW_SMILEY_BIT); c += smilelen; pos += smilelen; |
From: Eric W. <war...@us...> - 2001-12-10 20:10:07
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv21210/protocols/msn Modified Files: msn.c Log Message: hm Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- msn.c 2001/12/08 09:48:52 1.44 +++ msn.c 2001/12/10 20:10:03 1.45 @@ -1515,7 +1515,7 @@ utf8 = str_to_utf8(send); g_free(send); g_snprintf(buf, sizeof(buf), "MSG %d N %d\r\n%s%s", ++ms->trId, - strlen(MIME_HEADER) + strlen(message), + strlen(MIME_HEADER) + strlen(utf8), MIME_HEADER, utf8); g_free(utf8); if (msn_write(ms->fd, buf, strlen(buf)) < 0) { |
From: Adam F. <mi...@us...> - 2001-12-10 06:13:21
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv17308 Modified Files: aim.h im.c oscar.c Log Message: libfaim update (fix MacAIM chat invite crash) Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- aim.h 2001/12/10 00:48:27 1.25 +++ aim.h 2001/12/10 06:13:18 1.26 @@ -776,10 +776,23 @@ fu16_t charsubset; }; +/* Valid values for channel 2 args->status */ +#define AIM_RENDEZVOUS_PROPOSE 0x0000 +#define AIM_RENDEZVOUS_CANCEL 0x0001 +#define AIM_RENDEZVOUS_ACCEPT 0x0002 + struct aim_incomingim_ch2_args { fu8_t cookie[8]; fu16_t reqclass; fu16_t status; + fu16_t errorcode; + const char *clientip; + const char *clientip2; + const char *verifiedip; + fu16_t port; + const char *msg; /* invite message or file description */ + const char *encoding; + const char *language; union { struct { fu32_t checksum; @@ -787,31 +800,16 @@ time_t timestamp; fu8_t *icon; } icon; - struct { - fu32_t implementme; - } voice; struct { - fu8_t ip[22]; /* xxx.xxx.xxx.xxx:xxxxx\0 */ - } imimage; - struct { - char *msg; - char *encoding; - char *lang; - struct aim_chat_roominfo roominfo; + struct aim_chat_roominfo roominfo; } chat; struct { - char *ip; - unsigned char *cookie; - } getfile; - struct { - fu32_t implementme; - } sendfile; - struct { fu32_t fgcolor; fu32_t bgcolor; const char *rtfmsg; } rtfmsg; } info; + void *destructor; /* used internally only */ }; faim_export int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args); Index: im.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/im.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- im.c 2001/12/10 00:48:27 1.19 +++ im.c 2001/12/10 06:13:18 1.20 @@ -1138,8 +1138,20 @@ aimbs_get16(bs); /* 0x0001 */ args.iconsum = aimbs_get16(bs); args.iconstamp = aimbs_get32(bs); - args.icbmflags |= AIM_IMFLAGS_HASICON; + /* + * This looks to be a client bug. MacAIM 4.3 will + * send this tag, but with all zero values, in the + * first message of a conversation. This makes no + * sense whatsoever, so I'm going to say its a bug. + * + * You really shouldn't advertise a zero-length icon + * anyway. + * + */ + if (args.iconlen) + args.icbmflags |= AIM_IMFLAGS_HASICON; + } else if (type == 0x0009) { args.icbmflags |= AIM_IMFLAGS_BUDDYREQ; @@ -1174,18 +1186,8 @@ return ret; } -static int incomingim_ch2_buddylist(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_buddylist(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_bstream_t *servdata) { - aim_rxcallback_t userfunc; - int ret = 0; - aim_tlv_t *tse; - aim_bstream_t tbs; - - if (args->status != 0x0000) - return 1; /* ignore it -- not sure what it means */ - - tse = aim_gettlv(list2, 0x2711, 1); - aim_bstream_init(&tbs, tse->value, tse->length); /* * This goes like this... @@ -1206,21 +1208,21 @@ * ... * ... */ - while (aim_bstream_empty(&tbs)) { + while (servdata && aim_bstream_empty(servdata)) { fu16_t gnlen, numb; int i; char *gn; - gnlen = aimbs_get16(&tbs); - gn = aimbs_getstr(&tbs, gnlen); - numb = aimbs_get16(&tbs); + gnlen = aimbs_get16(servdata); + gn = aimbs_getstr(servdata, gnlen); + numb = aimbs_get16(servdata); for (i = 0; i < numb; i++) { fu16_t bnlen; char *bn; - bnlen = aimbs_get16(&tbs); - bn = aimbs_getstr(&tbs, bnlen); + bnlen = aimbs_get16(servdata); + bn = aimbs_getstr(servdata, bnlen); faimdprintf(sess, 0, "got a buddy list from %s: group %s, buddy %s\n", userinfo->sn, gn, bn); @@ -1230,334 +1232,132 @@ free(gn); } - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); - - return ret; + return; } -static int incomingim_ch2_buddyicon(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_buddyicon_free(aim_session_t *sess, struct aim_incomingim_ch2_args *args) { - aim_rxcallback_t userfunc; - int ret = 0; - aim_tlv_t *miscinfo; - aim_bstream_t tbs; - if (!(miscinfo = aim_gettlv(list2, 0x2711, 1))) - return 0; - aim_bstream_init(&tbs, miscinfo->value, miscinfo->length); - - args->info.icon.checksum = aimbs_get32(&tbs); - args->info.icon.length = aimbs_get32(&tbs); - args->info.icon.timestamp = aimbs_get32(&tbs); - args->info.icon.icon = aimbs_getraw(&tbs, args->info.icon.length); - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); - free(args->info.icon.icon); - return ret; + return; } -static int incomingim_ch2_voice(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_buddyicon(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_bstream_t *servdata) { - aim_msgcookie_t *cachedcook; - int ret = 0; - aim_rxcallback_t userfunc; - - faimdprintf(sess, 1, "rend: voice!\n"); - if (!(cachedcook = (aim_msgcookie_t*)calloc(1, sizeof(aim_msgcookie_t)))) - return 0; - - memcpy(cachedcook->cookie, args->cookie, 8); - cachedcook->type = AIM_COOKIETYPE_OFTVOICE; - cachedcook->data = NULL; - - if (aim_cachecookie(sess, cachedcook) == -1) - faimdprintf(sess, 0, "ERROR caching message cookie\n"); - - /* XXX: implement all this */ + if (servdata) { + args->info.icon.checksum = aimbs_get32(servdata); + args->info.icon.length = aimbs_get32(servdata); + args->info.icon.timestamp = aimbs_get32(servdata); + args->info.icon.icon = aimbs_getraw(servdata, args->info.icon.length); + } - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); + args->destructor = (void *)incomingim_ch2_buddyicon_free; - return ret; + return; } -static int incomingim_ch2_chat(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_chat_free(aim_session_t *sess, struct aim_incomingim_ch2_args *args) { - aim_tlv_t *miscinfo; - aim_bstream_t tbs; - aim_rxcallback_t userfunc; - int ret = 0; - - miscinfo = aim_gettlv(list2, 0x2711, 1); - aim_bstream_init(&tbs, miscinfo->value, miscinfo->length); - aim_chat_readroominfo(&tbs, &args->info.chat.roominfo); - - if (aim_gettlv(list2, 0x000c, 1)) - args->info.chat.msg = aim_gettlv_str(list2, 0x000c, 1); - - if (aim_gettlv(list2, 0x000d, 1)) - args->info.chat.encoding = aim_gettlv_str(list2, 0x000d, 1); - - if (aim_gettlv(list2, 0x000e, 1)) - args->info.chat.lang = aim_gettlv_str(list2, 0x000e, 1); - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); - - /* XXX free_roominfo */ + /* XXX aim_chat_roominfo_free() */ free(args->info.chat.roominfo.name); - free(args->info.chat.msg); - free(args->info.chat.encoding); - free(args->info.chat.lang); - - return ret; -} - -static int incomingim_ch2_getfile(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) -{ - char ip[30]; - aim_msgcookie_t *cachedcook; - aim_tlv_t *miscinfo; - aim_tlv_t *iptlv, *porttlv; - int ret = 0; - aim_rxcallback_t userfunc; - - memset(ip, 0, 30); - if (!(cachedcook = calloc(1, sizeof(aim_msgcookie_t)))) { - aim_freetlvchain(&list2); - return 0; - } - - if (!(miscinfo = aim_gettlv(list2, 0x2711, 1)) || - !(iptlv = aim_gettlv(list2, 0x0003, 1)) || - !(porttlv = aim_gettlv(list2, 0x0005, 1))) { - - faimdprintf(sess, 0, "rend: badly damaged file get request from %s...\n", userinfo->sn); - aim_cookie_free(sess, cachedcook); - aim_freetlvchain(&list2); - - return 0; - } - - snprintf(ip, 30, "%d.%d.%d.%d:%d", - aimutil_get8(iptlv->value+0), - aimutil_get8(iptlv->value+1), - aimutil_get8(iptlv->value+2), - aimutil_get8(iptlv->value+3), - aimutil_get16(porttlv->value)); - - faimdprintf(sess, 0, "rend: file get request from %s (%s)\n", userinfo->sn, ip); - - args->info.getfile.ip = ip; - memcpy(args->info.getfile.cookie, args->cookie, 8); - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); - - return ret; + return; } -static int incomingim_ch2_sendfile(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_chat(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_bstream_t *servdata) { -#if 0 - char ip[30]; - aim_msgcookie_t *cachedcook; - aim_tlv_t *miscinfo; - aim_tlv_t *iptlv, *porttlv; - int ret =0; - aim_rxcallback_t userfunc; - char *desc = NULL; - memset(ip, 0, 30); - - if (!(cachedcook = calloc(1, sizeof(aim_msgcookie_t)))) - return 0; - - if (!(miscinfo = aim_gettlv(list2, 0x2711, 1)) || - !(iptlv = aim_gettlv(list2, 0x0003, 1)) || - !(porttlv = aim_gettlv(list2, 0x0005, 1))) { - - faimdprintf(sess, 0, "rend: badly damaged file get request from %s...\n", userinfo->sn); - aim_cookie_free(sess, cachedcook); - - return 0; - } - - snprintf(ip, 30, "%d.%d.%d.%d:%d", - aimutil_get8(iptlv->value+0), - aimutil_get8(iptlv->value+1), - aimutil_get8(iptlv->value+2), - aimutil_get8(iptlv->value+3), - aimutil_get16(porttlv->value)); - - if (aim_gettlv(list2, 0x000c, 1)) - desc = aim_gettlv_str(list2, 0x000c, 1); - - faimdprintf(sess, 0, "rend: file transfer request from %s: %s (%s)\n", - userinfo->sn, desc, ip); - - memcpy(cachedcook->cookie, args->cookie, 8); - - ft = malloc(sizeof(struct aim_filetransfer_priv)); /* XXX */ - strncpy(ft->sn, userinfo.sn, sizeof(ft->sn)); - strncpy(ft->ip, ip, sizeof(ft->ip)); - strncpy(ft->fh.name, miscinfo->value+8, sizeof(ft->fh.name)); - cachedcook->type = AIM_COOKIETYPE_OFTSEND; - cachedcook->data = ft; - - if (aim_cachecookie(sess, cachedcook) == -1) - faimdprintf(sess, 0, "ERROR caching message cookie\n"); - - aim_accepttransfer(sess, rx->conn, ft->sn, cookie, AIM_CAPS_SENDFILE); + /* + * Chat room info. + */ + if (servdata) + aim_chat_readroominfo(servdata, &args->info.chat.roominfo); - if (desc) - free(desc); + args->destructor = (void *)incomingim_ch2_chat_free; - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, &args); -#endif - return 0; + return; } -static int incomingim_ch2_imimage(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_icqserverrelay_free(aim_session_t *sess, struct aim_incomingim_ch2_args *args) { - aim_rxcallback_t userfunc; - int ret = 0; - - /* Primary IP address */ - if (aim_gettlv(list2, 0x0003, 1)) { - aim_tlv_t *tlv; - - tlv = aim_gettlv(list2, 0x0003, 1); - - snprintf(args->info.imimage.ip, sizeof(args->info.imimage.ip), - "%d.%d.%d.%d:4443", - tlv->value[0], - tlv->value[1], - tlv->value[2], - tlv->value[3]); - } - - /* - * Alternate IP address - * - * Sort of. The peer doesn't send this -- the OSCAR - * server does. So it will be the IP address that the - * peer is directly connected to the internet with, which - * may not be the same as the IP above. If these two - * values differ, it's rather unlikely that this - * rendezvous is going to happen... - * - */ - if (aim_gettlv(list2, 0x0004, 1)) - ; - - /* Port number (not correct -- ignore) */ - if (aim_gettlv(list2, 0x0005, 1)) - ; - /* Unknown -- two bytes = 0x0001 */ - if (aim_gettlv(list2, 0x000a, 1)) - ; - - /* Unknown -- no value */ - if (aim_gettlv(list2, 0x000f, 1)) - ; - - faimdprintf(sess, 1, "rend: directIM request from %s (%s)\n", userinfo->sn, args->info.imimage.ip); - - /* - * XXX: there are a couple of different request packets for - * different things - */ - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); + free((char *)args->info.rtfmsg.rtfmsg); - return ret; + return; } /* * The relationship between AIM_CAPS_ICQSERVERRELAY and AIM_CAPS_ICQRTF is * kind of odd. This sends the client ICQRTF since that is all that I've seen * SERVERRELAY used for. + * + * Note that this is all little-endian. Cringe. + * */ -static int incomingim_ch2_icqserverrelay(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +static void incomingim_ch2_icqserverrelay(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_bstream_t *servdata) { - aim_rxcallback_t userfunc; - int ret = 0; - aim_tlv_t *miscinfo; - aim_bstream_t tbs; fu16_t hdrlen, anslen, msglen; fu16_t msgtype; - - if (!(miscinfo = aim_gettlv(list2, 0x2711, 1))) - return 0; - aim_bstream_init(&tbs, miscinfo->value, miscinfo->length); - hdrlen = aimbs_getle16(&tbs); - aim_bstream_advance(&tbs, hdrlen); + hdrlen = aimbs_getle16(servdata); + aim_bstream_advance(servdata, hdrlen); - hdrlen = aimbs_getle16(&tbs); - aim_bstream_advance(&tbs, hdrlen); + hdrlen = aimbs_getle16(servdata); + aim_bstream_advance(servdata, hdrlen); - msgtype = aimbs_getle16(&tbs); + msgtype = aimbs_getle16(servdata); - anslen = aimbs_getle32(&tbs); - aim_bstream_advance(&tbs, anslen); + anslen = aimbs_getle32(servdata); + aim_bstream_advance(servdata, anslen); - msglen = aimbs_getle16(&tbs); - args->info.rtfmsg.rtfmsg = aimbs_getstr(&tbs, msglen); + msglen = aimbs_getle16(servdata); + args->info.rtfmsg.rtfmsg = aimbs_getstr(servdata, msglen); - args->info.rtfmsg.fgcolor = aimbs_getle32(&tbs); - args->info.rtfmsg.bgcolor = aimbs_getle32(&tbs); + args->info.rtfmsg.fgcolor = aimbs_getle32(servdata); + args->info.rtfmsg.bgcolor = aimbs_getle32(servdata); - hdrlen = aimbs_getle32(&tbs); - aim_bstream_advance(&tbs, hdrlen); + hdrlen = aimbs_getle32(servdata); + aim_bstream_advance(servdata, hdrlen); + /* XXX This is such a hack. */ args->reqclass = AIM_CAPS_ICQRTF; - - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, 0x0002, userinfo, args); - free(args->info.icon.icon); + args->destructor = (void *)incomingim_ch2_icqserverrelay_free; - return ret; + return; } -/* XXX Ugh. I think its obvious. */ +typedef void (*ch2_args_destructor_t)(aim_session_t *sess, struct aim_incomingim_ch2_args *args); + static int incomingim_ch2(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, fu16_t channel, aim_userinfo_t *userinfo, aim_tlvlist_t *tlvlist, fu8_t *cookie) { - aim_tlv_t *block1; + aim_rxcallback_t userfunc; + aim_tlv_t *block1, *servdatatlv; aim_tlvlist_t *list2; - int ret = 0; struct aim_incomingim_ch2_args args; - aim_bstream_t bbs; + aim_bstream_t bbs, sdbs, *sdbsptr = NULL; fu8_t *cookie2; + int ret = 0; + + char clientip1[30] = {""}; + char clientip2[30] = {""}; + char verifiedip[30] = {""}; memset(&args, 0, sizeof(args)); /* * There's another block of TLVs embedded in the type 5 here. */ - if (!(block1 = aim_gettlv(tlvlist, 0x0005, 1)) || !block1->value) { - faimdprintf(sess, 0, "no tlv 0x0005 in rendezvous transaction!\n"); - return 0; - } - + block1 = aim_gettlv(tlvlist, 0x0005, 1); aim_bstream_init(&bbs, block1->value, block1->length); /* * First two bytes represent the status of the connection. * - * 0 is a request, 2 is an accept + * 0 is a request, 1 is a deny (?), 2 is an accept */ args.status = aimbs_get16(&bbs); @@ -1573,19 +1373,8 @@ /* * The next 16bytes are a capability block so we can * identify what type of rendezvous this is. - * - * Thanks to Eric Warmenhoven <war...@li...> (of GAIM) - * for pointing some of this out to me. In fact, a lot of - * the client-to-client info comes from the work of the GAIM - * developers. Thanks! - * - * Read off one capability string and we should have it ID'd. - * */ - if ((args.reqclass = aim_getcap(sess, &bbs, 0x10)) == 0x0000) { - faimdprintf(sess, 0, "rend: no ID block\n"); - return 0; - } + args.reqclass = aim_getcap(sess, &bbs, 0x10); /* * What follows may be TLVs or nothing, depending on the @@ -1595,78 +1384,136 @@ */ list2 = aim_readtlvchain(&bbs); -#if 0 /* this should be in the per-type blocks */ - if (!list2 || ((args.reqclass != AIM_CAPS_IMIMAGE) && !(aim_gettlv(list2, 0x2711, 1)))) { - aim_msgcookie_t *cook; - int type; + /* + * IP address from the perspective of the client. + */ + if (aim_gettlv(list2, 0x0002, 1)) { + aim_tlv_t *iptlv; - type = aim_msgcookie_gettype(args.reqclass); /* XXX: fix this shitty code */ + iptlv = aim_gettlv(list2, 0x0002, 1); - if ((cook = aim_checkcookie(sess, cookie, type)) == NULL) { - faimdprintf(sess, 0, "non-data rendezvous thats not in cache (type %d)\n", type); - aim_freetlvchain(&list2); - return 1; - } + snprintf(clientip1, sizeof(clientip1), "%d.%d.%d.%d", + aimutil_get8(iptlv->value+0), + aimutil_get8(iptlv->value+1), + aimutil_get8(iptlv->value+2), + aimutil_get8(iptlv->value+3)); + } - if (cook->type == AIM_COOKIETYPE_OFTGET) { - struct aim_filetransfer_priv *ft; + /* + * Secondary IP address from the perspective of the client. + */ + if (aim_gettlv(list2, 0x0003, 1)) { + aim_tlv_t *iptlv; - if (cook->data) { - int errorcode = -1; /* XXX shouldnt this be 0? */ + iptlv = aim_gettlv(list2, 0x0003, 1); - ft = (struct aim_filetransfer_priv *)cook->data; + snprintf(clientip2, sizeof(clientip2), "%d.%d.%d.%d", + aimutil_get8(iptlv->value+0), + aimutil_get8(iptlv->value+1), + aimutil_get8(iptlv->value+2), + aimutil_get8(iptlv->value+3)); + } - if (args.status != 0x0002) { + /* + * Verified IP address (from the perspective of Oscar). + * + * This is added by the server. + */ + if (aim_gettlv(list2, 0x0004, 1)) { + aim_tlv_t *iptlv; - if (aim_gettlv(list2, 0x000b, 1)) - errorcode = aim_gettlv16(list2, 0x000b, 1); + iptlv = aim_gettlv(list2, 0x0004, 1); - /* XXX this should make it up to the client, you know.. */ - if (errorcode) - faimdprintf(sess, 0, "transfer from %s (%s) for %s cancelled (error code %d)\n", ft->sn, ft->ip, ft->fh.name, errorcode); - } /* args.status != 0x0002 */ + snprintf(verifiedip, sizeof(verifiedip), "%d.%d.%d.%d", + aimutil_get8(iptlv->value+0), + aimutil_get8(iptlv->value+1), + aimutil_get8(iptlv->value+2), + aimutil_get8(iptlv->value+3)); + } - } else { - faimdprintf(sess, 0, "no data attached to file transfer\n"); - } /* !cook->data */ + /* + * Port number for something. + */ + if (aim_gettlv(list2, 0x0005, 1)) + args.port = aim_gettlv16(list2, 0x0005, 1); - } else if (cook->type == AIM_CAPS_VOICE) { + /* + * Error code. + */ + if (aim_gettlv(list2, 0x000b, 1)) + args.errorcode = aim_gettlv16(list2, 0x000b, 1); - faimdprintf(sess, 0, "voice request cancelled\n"); - - } else { - - faimdprintf(sess, 0, "unknown cookie cache type %d\n", cook->type); - } + /* + * Invitation message / chat description. + */ + if (aim_gettlv(list2, 0x000c, 1)) + args.msg = aim_gettlv_str(list2, 0x000c, 1); - aim_freetlvchain(&list2); + /* + * Character set. + */ + if (aim_gettlv(list2, 0x000d, 1)) + args.encoding = aim_gettlv_str(list2, 0x000d, 1); + + /* + * Language. + */ + if (aim_gettlv(list2, 0x000e, 1)) + args.language = aim_gettlv_str(list2, 0x000e, 1); - return 1; + /* Unknown -- two bytes = 0x0001 */ + if (aim_gettlv(list2, 0x000a, 1)) + ; + + /* Unknown -- no value */ + if (aim_gettlv(list2, 0x000f, 1)) + ; + + if (strlen(clientip1)) + args.clientip = (char *)clientip1; + if (strlen(clientip2)) + args.clientip2 = (char *)clientip2; + if (strlen(verifiedip)) + args.verifiedip = (char *)verifiedip; + + /* + * This is must be present in PROPOSALs, but will probably not + * exist in CANCELs and ACCEPTs. + * + * Service Data blocks are module-specific in format. + */ + if ((servdatatlv = aim_gettlv(list2, 0x2711 /* 10001 */, 1))) { + + aim_bstream_init(&sdbs, servdatatlv->value, servdatatlv->length); + sdbsptr = &sdbs; } -#endif /* * The rest of the handling depends on what type it is. + * + * Not all of them have special handling (yet). */ if (args.reqclass & AIM_CAPS_BUDDYICON) - ret = incomingim_ch2_buddyicon(sess, mod, rx, snac, userinfo, &args, list2); + incomingim_ch2_buddyicon(sess, mod, rx, snac, userinfo, &args, sdbsptr); else if (args.reqclass & AIM_CAPS_SENDBUDDYLIST) - ret = incomingim_ch2_buddylist(sess, mod, rx, snac, userinfo, &args, list2); - else if (args.reqclass & AIM_CAPS_VOICE) - ret = incomingim_ch2_voice(sess, mod, rx, snac, userinfo, &args, list2); - else if (args.reqclass & AIM_CAPS_IMIMAGE) - ret = incomingim_ch2_imimage(sess, mod, rx, snac, userinfo, &args, list2); + incomingim_ch2_buddylist(sess, mod, rx, snac, userinfo, &args, sdbsptr); else if (args.reqclass & AIM_CAPS_CHAT) - ret = incomingim_ch2_chat(sess, mod, rx, snac, userinfo, &args, list2); - else if (args.reqclass & AIM_CAPS_GETFILE) - ret = incomingim_ch2_getfile(sess, mod, rx, snac, userinfo, &args, list2); - else if (args.reqclass & AIM_CAPS_SENDFILE) - ret = incomingim_ch2_sendfile(sess, mod, rx, snac, userinfo, &args, list2); + incomingim_ch2_chat(sess, mod, rx, snac, userinfo, &args, sdbsptr); else if (args.reqclass & AIM_CAPS_ICQSERVERRELAY) - ret = incomingim_ch2_icqserverrelay(sess, mod, rx, snac, userinfo, &args, list2); - else - faimdprintf(sess, 0, "rend: unknown rendezvous 0x%04x\n", args.reqclass); + incomingim_ch2_icqserverrelay(sess, mod, rx, snac, userinfo, &args, sdbsptr); + + + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, channel, userinfo, &args); + + if (args.destructor) + ((ch2_args_destructor_t)args.destructor)(sess, &args); + + free((char *)args.msg); + free((char *)args.encoding); + free((char *)args.language); + aim_freetlvchain(&list2); return ret; @@ -1742,7 +1589,7 @@ ret = incomingim_ch1(sess, mod, rx, snac, channel, &userinfo, bs, cookie); - } else if (channel == 0x0002) { + } else if (channel == 2) { aim_tlvlist_t *tlvlist; /* @@ -1753,12 +1600,12 @@ ret = incomingim_ch2(sess, mod, rx, snac, channel, &userinfo, tlvlist, cookie); - /* - * Free up the TLV chain. - */ aim_freetlvchain(&tlvlist); + } else { + faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel. Ignoring.\n (chan = %04x)", channel); + return 0; } Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- oscar.c 2001/12/10 00:48:27 1.84 +++ oscar.c 2001/12/10 06:13:18 1.85 @@ -1351,6 +1351,11 @@ static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) { struct gaim_connection *gc = sess->aux_data; + debug_printf("rendezvous status %d (%s)\n", args->status, userinfo->sn); + + if (args->status != AIM_RENDEZVOUS_PROPOSE) + return 1; + if (args->reqclass & AIM_CAPS_CHAT) { char *name = extract_name(args->info.chat.roominfo.name); int *exch = g_new0(int, 1); @@ -1361,7 +1366,7 @@ serv_got_chat_invite(gc, name ? name : args->info.chat.roominfo.name, userinfo->sn, - args->info.chat.msg, + (char *)args->msg, m); if (name) g_free(name); @@ -1376,11 +1381,11 @@ char buf[256]; debug_printf("%s received direct im request from %s (%s)\n", - gc->username, userinfo->sn, args->info.imimage.ip); + gc->username, userinfo->sn, args->verifiedip); d->gc = gc; d->sn = g_strdup(userinfo->sn); - strncpy(d->ip, args->info.imimage.ip, sizeof(d->ip)); + strncpy(d->ip, args->verifiedip, sizeof(d->ip)); memcpy(d->cookie, args->cookie, 8); g_snprintf(buf, sizeof buf, "%s has just asked to directly connect to %s.", userinfo->sn, gc->username); |
From: Eric W. <war...@us...> - 2001-12-10 02:47:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv11461 Modified Files: ChangeLog Log Message: Rest In Agony, lagmeter. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.372 retrieving revision 1.373 diff -u -d -r1.372 -r1.373 --- ChangeLog 2001/12/05 10:21:11 1.372 +++ ChangeLog 2001/12/10 02:47:51 1.373 @@ -7,6 +7,8 @@ * IRC /list, /invite (Thanks Sean Egan) * Added swedish translation (Thanks Christian Rose) * Option to have IMs and Chats tabbed in same window + * Finally put the lagmeter plugin out of its misery and + removed it. (/me dances on its grave.) version 0.49 (11/29/2001): * Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) |
From: Eric W. <war...@us...> - 2001-12-10 01:06:12
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv15533 Modified Files: Makefile.am Removed Files: lagmeter.c Log Message: finally putting it out of its misery Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/Makefile.am,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- Makefile.am 2001/10/10 20:21:24 1.56 +++ Makefile.am 2001/12/10 01:06:09 1.57 @@ -11,7 +11,7 @@ plugindir = $(libdir)/gaim -plugin_DATA = autorecon.so chatlist.so iconaway.so lagmeter.so notify.so spellchk.so +plugin_DATA = autorecon.so chatlist.so iconaway.so notify.so spellchk.so $(plugin_DATA): $(top_srcdir)/src/gaim.h @@ -26,4 +26,4 @@ EXTRA_DIST = ChangeLog PERL-HOWTO HOWTO SIGNALS autorecon.c filectl.c iconaway.c \ - lagmeter.c notify.c spellchk.c gaim.pl mailchk.c chatlist.c + notify.c spellchk.c gaim.pl mailchk.c chatlist.c --- lagmeter.c DELETED --- |
From: Eric W. <war...@us...> - 2001-12-10 00:48:30
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv11595 Modified Files: aim.h aim_internal.h im.c info.c misc.c oscar.c service.c tlv.c Log Message: try that Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- aim.h 2001/12/01 00:56:30 1.24 +++ aim.h 2001/12/10 00:48:27 1.25 @@ -360,13 +360,14 @@ #define AIM_SESS_FLAGS_DONTTIMEOUTONICBM 0x00000008 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ -#define AIM_ICQ_STATE_ONLINE 0x0000 -#define AIM_ICQ_STATE_AWAY 0x0001 -#define AIM_ICQ_STATE_DND 0x0002 -#define AIM_ICQ_STATE_NA 0x0004 -#define AIM_ICQ_STATE_OCCUPIED 0x0010 -#define AIM_ICQ_STATE_CHAT 0x0020 -#define AIM_ICQ_STATE_INVISIBLE 0x0100 +#define AIM_ICQ_STATE_NORMAL 0x00000000 +#define AIM_ICQ_STATE_AWAY 0x00000001 +#define AIM_ICQ_STATE_DND 0x00000002 +#define AIM_ICQ_STATE_OUT 0x00000004 +#define AIM_ICQ_STATE_BUSY 0x00000010 +#define AIM_ICQ_STATE_CHAT 0x00000020 +#define AIM_ICQ_STATE_INVISIBLE 0x00000100 +#define AIM_ICQ_STATE_WEBAWARE 0x00010000 /* * AIM User Info, Standard Form. @@ -380,9 +381,9 @@ fu32_t onlinesince; fu32_t sessionlen; int capspresent; - fu16_t capabilities; + fu32_t capabilities; struct { - fu16_t status; + fu32_t status; fu32_t ipaddr; fu8_t crap[0x25]; /* until we figure it out... */ } icqinfo; @@ -395,7 +396,7 @@ faim_export time_t aim_userinfo_membersince(aim_userinfo_t *ui); faim_export time_t aim_userinfo_onlinesince(aim_userinfo_t *ui); faim_export fu32_t aim_userinfo_sessionlen(aim_userinfo_t *ui); -faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu16_t cap); +faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu32_t cap); #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ #define AIM_FLAG_ADMINISTRATOR 0x0002 @@ -455,7 +456,7 @@ faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v); faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v); faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v); -faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps); +faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu32_t caps); faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type); faim_internal int aim_addtlvtochain_userinfo(aim_tlvlist_t **list, fu16_t type, aim_userinfo_t *ui); faim_internal int aim_addtlvtochain_frozentlvlist(aim_tlvlist_t **list, fu16_t type, aim_tlvlist_t **tl); @@ -578,7 +579,7 @@ faim_export int aim_bos_setidle(aim_session_t *, aim_conn_t *, fu32_t); faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *); faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *); -faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu16_t caps); +faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu32_t caps); faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask); faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t); faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *); @@ -588,7 +589,7 @@ faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *); faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy); faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy); -faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status); +faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status); faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *); @@ -725,6 +726,16 @@ }; /* + * Arguments to aim_send_rtfmsg(). + */ +struct aim_sendrtfmsg_args { + const char *destsn; + fu32_t fgcolor; + fu32_t bgcolor; + const char *rtfmsg; /* must be in RTF */ +}; + +/* * This information is provided in the Incoming ICBM callback for * Channel 1 ICBM's. * @@ -777,7 +788,7 @@ fu8_t *icon; } icon; struct { - fu8_t junk; + fu32_t implementme; } voice; struct { fu8_t ip[22]; /* xxx.xxx.xxx.xxx:xxxxx\0 */ @@ -793,11 +804,17 @@ unsigned char *cookie; } getfile; struct { - fu8_t junk; + fu32_t implementme; } sendfile; + struct { + fu32_t fgcolor; + fu32_t bgcolor; + const char *rtfmsg; + } rtfmsg; } info; }; +faim_export int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args); faim_export int aim_send_im_ext(aim_session_t *sess, struct aim_sendimext_args *args); faim_export int aim_send_im(aim_session_t *, const char *destsn, unsigned short flags, const char *msg); faim_export int aim_send_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum); @@ -815,19 +832,23 @@ faim_export int aim_oft_getfile_end(aim_session_t *sess, aim_conn_t *conn); /* aim_info.c */ -#define AIM_CAPS_BUDDYICON 0x0001 -#define AIM_CAPS_VOICE 0x0002 -#define AIM_CAPS_IMIMAGE 0x0004 -#define AIM_CAPS_CHAT 0x0008 -#define AIM_CAPS_GETFILE 0x0010 -#define AIM_CAPS_SENDFILE 0x0020 -#define AIM_CAPS_GAMES 0x0040 -#define AIM_CAPS_SAVESTOCKS 0x0080 -#define AIM_CAPS_SENDBUDDYLIST 0x0100 -#define AIM_CAPS_GAMES2 0x0200 -#define AIM_CAPS_ICQ 0x0400 -#define AIM_CAPS_ABINTERNAL 0x0800 -#define AIM_CAPS_LAST 0x8000 +#define AIM_CAPS_BUDDYICON 0x00000001 +#define AIM_CAPS_VOICE 0x00000002 +#define AIM_CAPS_IMIMAGE 0x00000004 +#define AIM_CAPS_CHAT 0x00000008 +#define AIM_CAPS_GETFILE 0x00000010 +#define AIM_CAPS_SENDFILE 0x00000020 +#define AIM_CAPS_GAMES 0x00000040 +#define AIM_CAPS_SAVESTOCKS 0x00000080 +#define AIM_CAPS_SENDBUDDYLIST 0x00000100 +#define AIM_CAPS_GAMES2 0x00000200 +#define AIM_CAPS_ICQ 0x00000400 +#define AIM_CAPS_ABINTERNAL 0x00000800 +#define AIM_CAPS_ICQRTF 0x00001000 +#define AIM_CAPS_EMPTY 0x00002000 +#define AIM_CAPS_ICQSERVERRELAY 0x00004000 +#define AIM_CAPS_ICQUNKNOWN 0x00008000 +#define AIM_CAPS_LAST 0x00010000 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn); Index: aim_internal.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim_internal.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- aim_internal.h 2001/12/01 00:56:30 1.11 +++ aim_internal.h 2001/12/10 00:48:27 1.12 @@ -194,8 +194,8 @@ faim_internal void aim_conn_addgroup(aim_conn_t *conn, fu16_t group); -faim_internal fu16_t aim_getcap(aim_session_t *sess, aim_bstream_t *bs, int len); -faim_internal int aim_putcap(aim_bstream_t *bs, fu16_t caps); +faim_internal fu32_t aim_getcap(aim_session_t *sess, aim_bstream_t *bs, int len); +faim_internal int aim_putcap(aim_bstream_t *bs, fu32_t caps); faim_internal int aim_cachecookie(aim_session_t *sess, aim_msgcookie_t *cookie); faim_internal aim_msgcookie_t *aim_uncachecookie(aim_session_t *sess, fu8_t *cookie, int type); Index: im.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/im.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- im.c 2001/11/28 05:30:13 1.18 +++ im.c 2001/12/10 00:48:27 1.19 @@ -448,6 +448,122 @@ return 0; } +/* + * This only works for ICQ 2001b (thats 2001 not 2000). Better, only + * send it to clients advertising the RTF capability. In fact, if you send + * it to a client that doesn't support that capability, the server will gladly + * bounce it back to you. + * + * You'd think this would be in icq.c, but, well, I'm trying to stick with + * the one-group-per-file scheme as much as possible. This could easily + * be an exception, since Rendezvous IMs are external of the Oscar core, + * and therefore are undefined. Really I just need to think of a good way to + * make an interface similar to what AOL actually uses. But I'm not using COM. + * + */ +faim_export int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args) +{ + const char rtfcap[] = {"{97B12751-243C-4334-AD22-D6ABF73F1492}"}; /* AIM_CAPS_ICQRTF capability in string form */ + aim_conn_t *conn; + int i; + fu8_t ck[8]; + aim_frame_t *fr; + aim_snacid_t snacid; + int servdatalen; + + if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004))) + return -EINVAL; + + if (!args || !args->destsn || !args->rtfmsg) + return -EINVAL; + + servdatalen = 2+2+16+2+4+1+2 + 2+2+4+4+4 + 2+4+2+strlen(args->rtfmsg)+1 + 4+4+4+strlen(rtfcap)+1; + + 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+128+servdatalen))) + 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(args->destsn)); + aimbs_putraw(&fr->data, args->destsn, strlen(args->destsn)); + + /* + * TLV t(0005) + * + * Encompasses everything below. + */ + aimbs_put16(&fr->data, 0x0005); + aimbs_put16(&fr->data, 2+8+16 + 2+2+2 + 2+2 + 2+2+servdatalen); + + aimbs_put16(&fr->data, 0x0000); + aimbs_putraw(&fr->data, ck, 8); + aim_putcap(&fr->data, AIM_CAPS_ICQSERVERRELAY); + + /* + * t(000a) l(0002) v(0001) + */ + aimbs_put16(&fr->data, 0x000a); + aimbs_put16(&fr->data, 0x0002); + aimbs_put16(&fr->data, 0x0001); + + /* + * t(000f) l(0000) v() + */ + aimbs_put16(&fr->data, 0x000f); + aimbs_put16(&fr->data, 0x0000); + + /* + * Service Data TLV + */ + aimbs_put16(&fr->data, 0x2711); + aimbs_put16(&fr->data, servdatalen); + + aimbs_putle16(&fr->data, 11 + 16 /* 11 + (sizeof CLSID) */); + aimbs_putle16(&fr->data, 9); + aim_putcap(&fr->data, AIM_CAPS_EMPTY); + aimbs_putle16(&fr->data, 0); + aimbs_putle32(&fr->data, 0); + aimbs_putle8(&fr->data, 0); + aimbs_putle16(&fr->data, 0x03ea); /* trid1 */ + + aimbs_putle16(&fr->data, 14); + aimbs_putle16(&fr->data, 0x03eb); /* trid2 */ + aimbs_putle32(&fr->data, 0); + aimbs_putle32(&fr->data, 0); + aimbs_putle32(&fr->data, 0); + + aimbs_putle16(&fr->data, 0x0001); + aimbs_putle32(&fr->data, 0); + aimbs_putle16(&fr->data, strlen(args->rtfmsg)+1); + aimbs_putraw(&fr->data, args->rtfmsg, strlen(args->rtfmsg)+1); + + aimbs_putle32(&fr->data, args->fgcolor); + aimbs_putle32(&fr->data, args->bgcolor); + aimbs_putle32(&fr->data, strlen(rtfcap)+1); + aimbs_putraw(&fr->data, rtfcap, strlen(rtfcap)+1); + + aim_tx_enqueue(sess, fr); + + return 0; +} + faim_internal int aim_request_directim(aim_session_t *sess, const char *destsn, fu8_t *ip, fu16_t port, fu8_t *ckret) { aim_conn_t *conn; @@ -1368,6 +1484,54 @@ return ret; } +/* + * The relationship between AIM_CAPS_ICQSERVERRELAY and AIM_CAPS_ICQRTF is + * kind of odd. This sends the client ICQRTF since that is all that I've seen + * SERVERRELAY used for. + */ +static int incomingim_ch2_icqserverrelay(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_tlvlist_t *list2) +{ + aim_rxcallback_t userfunc; + int ret = 0; + aim_tlv_t *miscinfo; + aim_bstream_t tbs; + fu16_t hdrlen, anslen, msglen; + fu16_t msgtype; + + if (!(miscinfo = aim_gettlv(list2, 0x2711, 1))) + return 0; + aim_bstream_init(&tbs, miscinfo->value, miscinfo->length); + + hdrlen = aimbs_getle16(&tbs); + aim_bstream_advance(&tbs, hdrlen); + + hdrlen = aimbs_getle16(&tbs); + aim_bstream_advance(&tbs, hdrlen); + + msgtype = aimbs_getle16(&tbs); + + anslen = aimbs_getle32(&tbs); + aim_bstream_advance(&tbs, anslen); + + msglen = aimbs_getle16(&tbs); + args->info.rtfmsg.rtfmsg = aimbs_getstr(&tbs, msglen); + + args->info.rtfmsg.fgcolor = aimbs_getle32(&tbs); + args->info.rtfmsg.bgcolor = aimbs_getle32(&tbs); + + hdrlen = aimbs_getle32(&tbs); + aim_bstream_advance(&tbs, hdrlen); + + args->reqclass = AIM_CAPS_ICQRTF; + + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, 0x0002, userinfo, args); + + free(args->info.icon.icon); + + return ret; +} + /* XXX Ugh. I think its obvious. */ static int incomingim_ch2(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, fu16_t channel, aim_userinfo_t *userinfo, aim_tlvlist_t *tlvlist, fu8_t *cookie) { @@ -1498,6 +1662,8 @@ ret = incomingim_ch2_getfile(sess, mod, rx, snac, userinfo, &args, list2); else if (args.reqclass & AIM_CAPS_SENDFILE) ret = incomingim_ch2_sendfile(sess, mod, rx, snac, userinfo, &args, list2); + else if (args.reqclass & AIM_CAPS_ICQSERVERRELAY) + ret = incomingim_ch2_icqserverrelay(sess, mod, rx, snac, userinfo, &args, list2); else faimdprintf(sess, 0, "rend: unknown rendezvous 0x%04x\n", args.reqclass); Index: info.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/info.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- info.c 2001/11/17 13:57:30 1.8 +++ info.c 2001/12/10 00:48:27 1.9 @@ -106,7 +106,7 @@ return ui->sessionlen; } -faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu16_t cap) +faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu32_t cap) { if (!ui || !ui->capspresent) @@ -117,11 +117,18 @@ /* - * Capability blocks. + * Capability blocks. + * + * These are CLSIDs. They should actually be of the form: + * + * {0x0946134b, 0x4c7f, 0x11d1, + * {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + * + * But, eh. */ static const struct { - unsigned short flag; - unsigned char data[16]; + fu32_t flag; + fu8_t data[16]; } aim_caps[] = { /* @@ -165,6 +172,10 @@ {0x09, 0x46, 0x13, 0x48, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, + {AIM_CAPS_ICQSERVERRELAY, + {0x09, 0x46, 0x13, 0x49, 0x4c, 0x7f, 0x11, 0xd1, + 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, + /* * Indeed, there are two of these. The former appears to be correct, * but in some versions of winaim, the second one is set. Either they @@ -186,6 +197,18 @@ {0x09, 0x46, 0x13, 0x4f, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, + {AIM_CAPS_ICQRTF, + {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, + 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}, + + {AIM_CAPS_ICQUNKNOWN, + {0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, + 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}, + + {AIM_CAPS_EMPTY, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, + {AIM_CAPS_LAST} }; @@ -194,9 +217,9 @@ * are not naturally bounded. * */ -faim_internal fu16_t aim_getcap(aim_session_t *sess, aim_bstream_t *bs, int len) +faim_internal fu32_t aim_getcap(aim_session_t *sess, aim_bstream_t *bs, int len) { - fu16_t flags = 0; + fu32_t flags = 0; int offset; for (offset = 0; aim_bstream_empty(bs) && (offset < len); offset += 0x10) { @@ -224,7 +247,7 @@ return flags; } -faim_internal int aim_putcap(aim_bstream_t *bs, fu16_t caps) +faim_internal int aim_putcap(aim_bstream_t *bs, fu32_t caps) { int i; Index: misc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/misc.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- misc.c 2001/12/01 00:56:30 1.10 +++ misc.c 2001/12/10 00:48:27 1.11 @@ -78,7 +78,7 @@ * Gives BOS your profile. * */ -faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu16_t caps) +faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu32_t caps) { static const char defencoding[] = {"text/aolrtf; charset=\"us-ascii\""}; aim_frame_t *fr; Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- oscar.c 2001/12/10 00:14:07 1.83 +++ oscar.c 2001/12/10 00:48:27 1.84 @@ -2365,7 +2365,7 @@ gc->away = NULL; if (!strcmp(state, "Online")) - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_ONLINE); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); else if (!strcmp(state, "Away")) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); gc->away = ""; @@ -2373,10 +2373,10 @@ aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_DND); gc->away = ""; } else if (!strcmp(state, "Not Available")) { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NA); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT); gc->away = ""; } else if (!strcmp(state, "Occupied")) { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OCCUPIED); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_BUSY); gc->away = ""; } else if (!strcmp(state, "Free For Chat")) { aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT); @@ -2386,10 +2386,10 @@ gc->away = ""; } else if (!strcmp(state, GAIM_AWAY_CUSTOM)) { if (message) { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NA); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT); gc->away = ""; } else { - aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_ONLINE); + aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); } } } @@ -2590,9 +2590,9 @@ return icon_away_xpm; if (uc & AIM_ICQ_STATE_DND) return icon_dnd_xpm; - if (uc & AIM_ICQ_STATE_NA) + if (uc & AIM_ICQ_STATE_OUT) return icon_na_xpm; - if (uc & AIM_ICQ_STATE_OCCUPIED) + if (uc & AIM_ICQ_STATE_BUSY) return icon_occ_xpm; if (uc & AIM_ICQ_STATE_CHAT) return icon_ffc_xpm; Index: service.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/service.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- service.c 2001/12/01 00:56:31 1.3 +++ service.c 2001/12/10 00:48:27 1.4 @@ -729,7 +729,7 @@ * Currently only works if using ICQ. * */ -faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status) +faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status) { aim_frame_t *fr; aim_snacid_t snacid; Index: tlv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/tlv.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tlv.c 2001/12/01 00:56:31 1.5 +++ tlv.c 2001/12/10 00:48:27 1.6 @@ -279,9 +279,9 @@ * %AIM_CAPS_SENDFILE Supports Send File functions * */ -faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps) +faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu32_t caps) { - fu8_t buf[16*16]; /* icky fixed length buffer */ + fu8_t buf[16*16]; /* XXX icky fixed length buffer */ aim_bstream_t bs; if (!caps) |
From: Eric W. <war...@us...> - 2001-12-10 00:14:10
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv4837/protocols/oscar Modified Files: oscar.c Log Message: ok Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- oscar.c 2001/12/10 00:05:12 1.82 +++ oscar.c 2001/12/10 00:14:07 1.83 @@ -1501,6 +1501,7 @@ static int gaim_parse_genericerr(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; fu16_t reason; + char *m; va_start(ap, fr); reason = (fu16_t)va_arg(ap, unsigned int); @@ -1508,6 +1509,11 @@ debug_printf("snac threw error (reason 0x%04x: %s)\n", reason, (reason < msgerrreasonlen) ? msgerrreason[reason] : "unknown"); + + m = g_strdup_printf(_("SNAC threw error: %s\n"), + reason < msgerrreasonlen ? msgerrreason[reason] : "Unknown error"); + do_error_dialog(m, _("Gaim - Oscar SNAC Error")); + g_free(m); return 1; } |
From: Eric W. <war...@us...> - 2001-12-10 00:05:15
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv2987/protocols/oscar Modified Files: oscar.c Log Message: why do i care Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- oscar.c 2001/12/08 09:48:52 1.81 +++ oscar.c 2001/12/10 00:05:12 1.82 @@ -1506,7 +1506,7 @@ reason = (fu16_t)va_arg(ap, unsigned int); va_end(ap); - debug_printf("snac threw error (reason 0x%04x: %s\n", reason, + debug_printf("snac threw error (reason 0x%04x: %s)\n", reason, (reason < msgerrreasonlen) ? msgerrreason[reason] : "unknown"); return 1; |
From: Eric W. <war...@us...> - 2001-12-09 14:06:39
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv22994 Modified Files: HACKING Removed Files: PRPL Log Message: bye bye my love bye bye Index: HACKING =================================================================== RCS file: /cvsroot/gaim/gaim/HACKING,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- HACKING 2001/11/01 18:50:39 1.26 +++ HACKING 2001/12/09 14:06:36 1.27 @@ -4,15 +4,20 @@ gaim, here's a brief tutorial on how gaim works. I'll quickly describe the logical flow of things, then what you'll find in each of the source files. As an added bonus, I'll try and describe as best I can how multiple -connections and multiple protocols work. Depending on how much I want -to avoid my final tomorrow I may even describe other parts of gaim that -I particularly want to brag about. Hopefully that's enough to get most -of you going. +connections and multiple protocols work. Depending on how much I want to +avoid my final tomorrow I may even describe other parts of gaim that I +particularly want to brag about. Hopefully that's enough to get most of +you going. +If you don't know how event-driven programs work, stop right now. Gaim +uses GTK+'s main loop (actually GLib's but I won't talk about how GTK +works) and uses GLib functions for timeouts and socket notification. If +you don't know GTK you should go learn that first. + If you're going to hack gaim, PLEASE, PLEASE PLEASE PLEASE send patches against the absolute latest CVS. I get really annoyed when I get patches -against the last released version, especially since I don't usually -have a copy of it on my computer, and gaim tends to change a lot between +against the last released version, especially since I don't usually have +a copy of it on my computer, and gaim tends to change a lot between versions. (I sometimes get annoyed when they're against CVS from 3 days ago, but can't complain because it's usually my fault that I haven't looked at the patch yet.) To get gaim from CVS (if you haven't already), @@ -20,37 +25,37 @@ $ export CVSROOT=:pserver:ano...@cv...:/cvsroot/gaim $ cvs login (hit enter as the password) -$ cvs co gaim -(you'll see it getting all of the files) +$ cvs co gaim (you'll see it getting all of the files) $ cd gaim $ ./autogen.sh -You'll now have your normal gaim tree with ./configure and all. (If you -want to make your life really simple, learn how CVS works. CVS is your -friend.) To make a patch, just edit the files right there in that tree -(don't bother with two trees, or even two copies of the same file). Then -when you're ready to make your patch, simply run 'cvs diff -u >my.patch' -and send it off; either post it on sf.net/projects/gaim in the patches -section, or email it to ga...@ma.... +You'll now have your normal gaim tree with ./configure and all (which +./autogen.sh takes the liberty of running for you). (If you want to make +your life really simple, learn how CVS works. CVS is your friend.) To make +a patch, just edit the files right there in that tree (don't bother with +two trees, or even two copies of the same file). Then when you're ready to +make your patch, simply run 'cvs diff -u >my.patch' and send it off; +either post it on sf.net/projects/gaim in the patches section, or email it +to ga...@ma.... This file was last modified by $Author$ on $Date$. Do not expect any information contained within to be current or correct. -Here's something new. Someone requested that I comment the code. No. I'm -a lazy bastard, and I understand most of the code, so I don't need the -comments. I understand that some of you do though. So give me the names -of specific functions that you'd like commented and I'll see what I can -do. It's more likely that those comments will be updated with the code -than this file is, though even that is still unlikely. +Here's something new. Someone requested that I comment the code. No. I'm a +lazy bastard, and I understand most of the code, so I don't need the +comments. I understand that some of you do though. So give me the names of +specific functions that you'd like commented and I'll see what I can do. +It's more likely that those comments will be updated with the code than +this file is, though even that is still unlikely. CODING STYLE ============ -Coding styles are like assholes, everyone has one and no one likes -anyone elses. This is mine and if you want me to accept a patch from -you without getting annoyed you'll follow this coding style. :) +Coding styles are like assholes, everyone has one and no one likes anyone +elses. This is mine and if you want me to accept a patch from you without +getting annoyed you'll follow this coding style. :) It would probably just be easier for me to include CodingStyle from the linux kernel source. @@ -64,14 +69,14 @@ for else statements should have both braces on the same line as the else (i.e. "} else {"). -No functionOrVariableNamesLikeThis. Save it for Java. Underscores are -your friend. "tmp" is an excellent variable name. Hungarian style will -not be tolerated. Go back to Microsoft. +No functionOrVariableNamesLikeThis. Save it for Java. Underscores are your +friend. "tmp" is an excellent variable name. Hungarian style will not be +tolerated. Go back to Microsoft. I have a 105-char wide Eterm. Deal with it. -NO goto. I'm very likely to refuse a patch if it makes use of goto. If -you feel the need to use goto, you need to rethink your design and flow. +NO goto. I'm very likely to refuse a patch if it makes use of goto. If you +feel the need to use goto, you need to rethink your design and flow. PROGRAM FLOW @@ -84,30 +89,24 @@ At the login window, when "Accounts" is clicked, account_editor() is called. This then displays all of the users and various information -about them. If the user clicks the "Signon" button instead, serv_login -is called. +about them. (Don't ask about what happens when "Sign On" is called. It's +quite hackish. The only reason the login window is there anymore is to +make it more palatable to people so used to WinAIM that they can't accept +anything else.) When the "Sign on/off" button is clicked, serv_login is passed the username and the password for the account. If the password length is zero (the password field is a character array rather than pointer so it will not be NULL) then the Signon callback will prompt for the password before calling serv_login. serv_login then signs in the user using the -appropriate protocol. We'll assume TOC for the rest of this discussion; -even the libfaim guys get scared by oscar.c, and I'll talk about the -PRPLs later. - -After you're signed in (I'll skip that discussion - I doubt many people -are going to change the login process, since it pretty much just follows -PROTOCOL), Gaim draws the buddy list by calling show_buddy_list, and -waits for input from two places: the server and the user. The first -place it gets input from after signon is usually the server, when the -server tells Gaim which buddies are signed on. +appropriate protocol. -When there is information ready to be read from the server, toc_callback -is called (by GDK) to parse the incoming information. On an UPDATE, -serv_got_update is called, which takes care of things like notifying -conversation windows of the update if need be; notifying the plugins; -and finally, calling set_buddy. +After you're signed in, Gaim draws the buddy list by calling +show_buddy_list. Assuming the user has a buddy list (all buddy list +functions are controlled by list.c; when you sign on do_import is called +and that loads the locally saved list), the protocol calls +serv_got_update, which sets the information in the appropriate struct +buddy and then passes it off to set_buddy. set_buddy is responsible for a lot of stuff, but most of it is done implicitly. It's responsible for the sounds (which is just a call to @@ -119,9 +118,13 @@ New connections happen the exact same way as described above. Each aim_user can have one gaim_connection associated with it. aim_user and -gaim_connection both have a protocol field; gaim_connection's should -be constant once it is set. (I'll talk about the gaim_connection struct -more later.) +gaim_connection both have a protocol field. This is kind of confusing: +gaim, except for the account editor screen and when the user signs on, +ignores the user's protocl field, and only uses the connection's protocol +field. You can change the connection's protocol field once it's created +and been assigned a PRPL to use to change certain behavior (Oscar does +this because it handles both AIM and ICQ). I'll talk about the +gaim_connection struct more later. When the user opens a new conversation window, new_conversation is called. That's easy enough. If there isn't a conversation with the person already @@ -165,14 +168,10 @@ browser.c: Code for opening a browser window. Most of the code is trying to deal with Netscape. The most important function here is open_url. Have fun. - (This file may give you problems with GTK 2.0, because it uses parts - of GDK that it's not supposed to know about.) buddy.c: - This takes care of not only nearly everything buddy-related (the - buddy lists, the window, etc.), but also a lot of the code flow and - util functions. Look for good things like find_buddy, set_buddy, - and signoff here. + This takes care of the buddy list window and most things related to it. + It still has some functions that manage the list, but not many. buddy_chat.c: This takes care of the buddy chat stuff. This used to be a lot bigger @@ -189,6 +188,9 @@ chat and IM toolbar (with the B/I/U/S buttons) are both built from the same function, build_conv_toolbar. +core.c: + This is the start of what will become the main() for gaim-core. + dialogs.c: A massive file with a lot of little utility functions. This is where all of those little dialog windows are created. Things like the warn dialog @@ -216,7 +218,8 @@ gtkticker.c: Syd, our resident GTK God, wrote a GtkWidget, GtkTicker. This is that - widget. It's cool, and it's tiny. + widget. It's cool, and it's tiny. This is actually a really good example + widget for those of you looking to write your own. html.c: Don't ask my why this is called html.c. Most of it is just grab_url, @@ -229,6 +232,21 @@ reporting idle time (imagine that). It's a pretty straight-forward file. This also takes care of the auto-away stuff. +list.c: + This file contains all of the routines for managing buddy lists, + including importing them from a file, saving them, adding and removing + buddies and groups, etc. + +md5.c: + Oscar, Yahoo, and MSN all require md5 hashing, so better to put it in + the core than have the same thing in three different places. + +module.c: + This contains all of the plugin code, except for the UI. This is what + actually loads the plugins, makes sure they're valid, has the code for + setting up plugin event handlers, and contains the plugin_event method + that gaim calls on events. + multi.c: This is the file that tries to take care of most of the major issues with multiple connections. The best function in here by far is the @@ -245,11 +263,7 @@ implements the AIM module. plugins.c: - This is the "plugin plug", as the file states. This file is probably - the only file in all of gaim that at the top has all of the functions - and global and static variables named out for you. It makes reading - it a little easier, but not by much. A lot of the code in here deals - with the plugin window rather than the plugins themselves. + This contains the UI for the plugins dialog. It's mostly GTK. prefs.c: The important function in here is build_prefs, but the most useful @@ -261,12 +275,6 @@ window uses a CList instead of a Notebook, and there's a pretty bad hack to get it to work. I won't tell you what though. -prpl.c: - This file is what lets gaim dynamically load protocols, sort of. All - of the actual dlopen(), dlsym() stuff is in plugins.c. But this - contains all of the functions that the protocol plugin needs to call, - and manages all of the protocols. It's a pretty simple file actually. - proxy.c: Adam (of libfaim glory) got bored one day and rewrote this file, so now everything actually works. The main function is proxy_connect, @@ -274,6 +282,12 @@ at all) and passes off the data to the appropriate function. This file should be pretty straight-forward. +prpl.c: + This file is what lets gaim dynamically load protocols, sort of. All + of the actual dlopen(), dlsym() stuff is in module.c. But this contains + all of the functions that the protocol plugin needs to call, and manages + all of the protocols. It's a pretty simple file actually. + server.c: This is where all of the differentiation between the different protocols is done. Nearly everything that's network related goes through here @@ -301,65 +315,12 @@ of it is particularly tasty; it's all just utility functions. Just like the name says. -PRPL sources: -------------- - -ICQ (UDP v5) - All of the .c and .h files in here, with the exception of gaim_icq.c, - are part of ICQLib, by Bill Soudan and others. gaim_icq.c is what - interacts with gaim, and Eric wrote it. ICQLib is a fairly complete - implementation of the ICQ protocol, so if you want to add a new - feature you're probably going to be adding it to gaim_icq.c and not - to ICQLib. - -ICQ (2000) - This protocol doesn't exist yet. If you get really bored one day, - you can write it. It shouldn't be that hard since ICQ2000 uses Oscar, - so it should just be copying everything from oscar/ to here, and then - making small modifications to deal with various things. Have fun. - -IRC - Rob wrote irc.c, and since it is only one file it stands by itself. - All of the networking code is contained inside this file, as well as - the parts that interact with gaim. - -Jabber - jabber.c was written by Adam Fritzler (the guy that wrote libfaim), - and is maintained by Eric. The other .c and .h files belong to - libxode and libjabber, which were written by the Jabber developers. - -MSN - Rob wrote msn.c, and md5.c is a standard file. MSN doesn't use its - own library; all of the networking code is included inside of msn.c. - -Napster - Rob wrote napster.c, and since it is only one file it stands by - itself. - -Oscar - Most of these files are libfaim; the only one that's written by a Gaim - developer is oscar.c, and even that's questionable. oscar.c is mostly - copied straight from faimtest, the small program that comes with - libfaim. - -TOC - Everything TOC-related, more or less. All of it is in one big file, so - depending on your style that either makes things a lot easier or a lot - harder. Have fun with it. This protocol seems to break more easily - than any of the others, which seems odd to me. But oh well. - -Yahoo - All of the files in here were written by Eric. All of the .c and .h - files except yay.c are part of a library that Eric wrote, libyay. - yay.c is what interacts with gaim. - -Zephyr - zephyr.c is the only file in this directory by Eric; all the other - files are part of the Zephyr library from MIT. - +For the PRPLs, the only protocol whose "main" gaim file isn't the same as +the name of the protocol is ICQ; for that it's gaim_icq.c. But ICQ is +deprecated and you should be using Oscar for ICQ anyway. -HOW THE BUDDY LIST WORKS -======================== +HOW BUDDY LISTS WORK +==================== The buddy list is a pain in the ass. Let me start off by saying that. The most difficult part about getting gaim to do multiple connections was @@ -367,18 +328,21 @@ 0.10.x and earlier, which is what I was aiming for. However, the code is completely different. And not much better. -All of the buddy list stuff is in buddy.c, so you'll only have to have -that one file open (and possibly gaim.h for the struct definitions). There -are two sets of functions: those that deal with the buddy lists, and -those that deal with the window. (I say lists because each connection -has their own buddy list, independent of the others, even though the UI -merges them.) +There are two parts to the buddy list: the lists for the connections and +the Buddy List window. list.c contains code to manage the lists themselves +and buddy.c contains the code for the Buddy List window. -The buddy list functions work pretty much the same way they did before; -except now that each buddy and group belongs to a connection, things -like find_buddy take an additional argument, the connection you want to -search for the buddy in. Read gaim.h for a good list of them: find_buddy, -find_group, add_buddy, remove_buddy, remove_group. +Each buddy needs to belong to a connection, it cannot belong to a +"protocol" like in EveryBuddy. The reason is because when you are adding +buddies, you tell the server who is on your buddy list so it can tell you +about them; in order to tell the server, it needs to go out over a +connection. Going out over all connections would not be good, so you need +to specify which connection they go out on. + +Managing lists is therefore fairly easy, each group and buddy has an +associated connection. Management functions like add_buddy/remove_buddy +and add_group/remove_group all take a gaim_connection. These are all in +list.c. They're boring. The window is a lot more fun. There's really only one function that does anything interesting, and that's set_buddy. (There's also things @@ -475,10 +439,7 @@ in an aim_user struct, and kept track of in the aim_users GList (GSList?). Each aim_user has certain features: a username, a password, and user_info. It also has certain options, and the protocol it uses to sign on (kept -as an int which is #define'd in prpl.h). The way the management of the -users works is, there will (hopefully) only be one user for a given -screenname/ protocol pair (i.e. you may have two user warmenhoven's, -but they'll both have a different protocol number). +as an int which is #define'd in prpl.h). Now then, there are protocols that gaim knows about. Each protocol is in a prpl struct and kept track of in the protocols GSList. The way the @@ -523,9 +484,71 @@ I hope some of that made sense. Looking back at it it makes absolutely no sense to me. Thank god I wrote the code; otherwise I'm sure I'd be lost. + +WRITING PRPLS +============= + +Start off with a protocol that you want to implement; make sure it has a +number defined in prpl.h. If it doesn't, talk to Rob or Eric about adding +it. *NEVER* use an unassigned number, not even for testing or personal +use. It's possible that number will be used later by something else and +that would cause quite a few head-scratchers. + +Start off with the following boiler plate: + +static struct prpl *my_protocol = NULL; + +void newproto_init(struct prpl *ret) { + ret->protocol = PROTO_NEWPROTO; + + my_protocol = ret; +} + +#ifndef STATIC + +char *gaim_plugin_init(GModule *handle) +{ + load_protocol(newproto_init, sizeof(struct prpl)); + return NULL; +} + +void gaim_plugin_remove() +{ + struct prpl *p = find_prpl(PROTO_NEWPROTO); + if (p == my_protocol) + unload_protocol(p); +} + +char *name() +{ + return "New Protocol"; +} + +char *description() +{ + return PRPL_DESC("New Protocol"); +} + +#endif + +Replace all NEWPROTO things with your protocol name (e.g. PROTO_OSCAR +instead of PROTO_NEWPROTO, oscar_init instead of newproto_init). Then +populate your struct prpl; the most important function is actually name(), +because without it, Gaim will most likely segfault. The second most +important function is login(). Not all functions need to be implemented. + There should be absolutely *ZERO* GTK in the PRPLs. PRPLs should *NEVER* say what the UI *looks* like, only what information needs to be there. There's currently an effort to get the GTK that is contained in the PRPLs directory out of there. If you submit a patch that adds GTK to those directories it's very likely to be refused, unless if I'm in a good mood and decide to relocate things for you. That's not likely. + +You're probably wondering how you can do certain things without GTK. Well, +you're just going to have to make do. Rely on the UI, that's why it's +there. A PRPL should have absolutely ZERO interaction with the user, it +should all be handled by the UI. + +Don't use the _options variables at all. The core should take care of all +of that. There are several proto_opt fields that you can use on a per-user +basis. Check out existing protocols for more details. --- PRPL DELETED --- |
From: Eric W. <war...@us...> - 2001-12-09 13:19:01
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv15473 Modified Files: Makefile.am README configure.ac gaim.spec.in Removed Files: BUGS STATUS Log Message: i'm not like them, but i can pretend. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/Makefile.am,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Makefile.am 2001/11/27 20:54:17 1.30 +++ Makefile.am 2001/12/09 13:18:58 1.31 @@ -1,6 +1,6 @@ EXTRA_DIST = gaim.spec.in gaim_applet.gnorba gaim.desktop gaim_applet.desktop \ - HACKING STATUS gaim2blt.pl licq2gaim.pl + HACKING gaim2blt.pl licq2gaim.pl if DISTRIB Index: README =================================================================== RCS file: /cvsroot/gaim/gaim/README,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- README 2001/11/20 06:16:14 1.23 +++ README 2001/12/09 13:18:58 1.24 @@ -7,80 +7,200 @@ Mark Spencer <mar...@ma...> Gaim is an IM client that supports many protocols, including AIM, ICQ, -MSN, IRC, and Jabber. Gaim is NOT endorsed by, nor affiliated with, AOL -nor any other company in ANY way. +MSN, IRC, and Jabber. Gaim is NOT endorsed by, nor affiliated with, +AOL nor any other company in ANY way. -* Build: -./configure ; make -for the stock version. ./configure --help to see what option you can get. -You need to use gmake, BSD make will not work. +BUILD +===== -You need GTK 1.2.3. I don't wanna hear about it, if you can't get it to -work under a lower version. +Read the 'INSTALL' file for more detailed directions. +Gaim uses the standard ./configure ; make. You need to use gmake, BSD +make probably won't work. Remember, run ./configure --help to see what +build options are available. + +In order to compile Gaim, you need to have GTK+ 1.2.5 installed (as +well as the development files!). The configure script will fail if you +don't. You can get it from http://www.gtk.org/. + Gaim will try to compile with Gnome features if you have Gnome on your system. If you don't have them, it will settle for simply GTK. If you don't want Gnome bits, ./configure --disable-gnome If you want to build as a GNOME applet: ./configure --enable-panel ; make -then su to root and run "make install". +then su to root and run "make install". Afterwards panel->Add applet->Network->Gaim should be there. -* Run: -type "./gaim" +RUN +=== -To use the other services (such as Yahoo and IRC) which are available as -plugins: +You should run 'make install' as root to make sure plugins and other files +get installed into locations they want to be in. Once you've done that, +you only need to run 'gaim'. + +To use the other services (such as Yahoo and IRC) which are available +as plugins: + They are installed in $libdir/gaim, which usually is either /usr/lib/gaim or /usr/local/lib/gaim, and should have a somewhat descriptive name (e.g. libyahoo.so or irc.so). Load those plugins using the normal plugin dialog. Then in the account editor, add a new account; the Protocol option menu -should now have another option for the protocol that you loaded. Then you -can sign that account on. +should now have another option for the protocol that you loaded. Then +you can sign that account on. -ICQ and Zephyr are currently the only two protocols that don't use the -global proxy configuration; however, if you have the proxy set to use a -SOCKS5 proxy, ICQ will use it. If the proxy options aren't robust enough -for you there are several libraries that you can link gaim against. +Read below for protocol-specific information. -* Plugins: +PLUGINS +======= + If you do not wish to enable the plugin support within Gaim, run the ./configure script with the --disable-plugins option and recompile your source code. This will prevent the ability to load plugins. -'make install' puts the plugins in $PREFIX/lib/gaim (PREFIX being what you -specified when you ./configure'd - it defaults to /usr/local). Gaim looks -for the plugins in that directory by default, but they do not have to be -there to use them. Also, plugins have a .so extension by default, though -they do not have to. +'make install' puts the plugins in $PREFIX/lib/gaim (PREFIX being what +you specified when you ./configure'd - it defaults to /usr/local). Gaim +looks for the plugins in that directory by default, but they do not have +to be there to use them. Also, plugins have a .so extension by default, +though they do not have to. -* Notes: +To build a plugin from a .c file, put it in the plugins/ directory in +the source and run 'make filename.so', e.g. if you have the .c file +'kickass.c', put it in the plugins/ directory, and from that directory, +run 'make kickass.so'. -This should now compile under Solaris, Digital Unix, Irix, etc w/o a -problem. -This compiles without warnings on Linux-x86 2.2.10 glibc2.1, GTK 1.2.3 system. -If you get warnings on something else, let me know and I'll check it out. -If you get errors, upgrade to the latest GTK-1.2 before bothering me. +NOTES +===== -The resulting executable is standalone, so you can put it in /usr/bin or -whatever. +If you manually set a command for your browser or sound player options, +make sure to put double-quotes around the "%s", otherwise bad things may +happen. -The panel (if you made an applet) requires certain things to be in certain -places, but the Makefile/configure script should figure things out for you. +If you come across a bug, please report it to http://gaim.sf.net/bug.php3. -If you set a command for your browser or your sound player, make sure to put -quotes around the %s where appropriate; otherwise, bad things could happen. -Remember, you did it to yourself. +There always seems to be some iffy-ness by a lot of people about +whether to use the CVS version or stick with a stable release. Use the +CVS version. If you need a version that you know is reliable, then keep +your favorite one in case of an emergency. But for the most part, gaim +is not mission-critical software, and if you can help us find a few bugs +before we release, all the better. (Also, CVS tends to be more stable +than releases, since we get 10 or 12 bug reports right after we make a +release, and all those bugs are fixed within a day or two usually.) Read +http://gaim.sf.net/cvs.php for more information. -Send me bug reports. The web page is http://gaim.sourceforge.net/and the ftp -site is ftp://ftp.sourceforge.net/pub/sourceforge/gaim. We also have a -sourceforge page at http://sourceforge.net/projects/gaim/ -Keep your eyes out for updates, and I'll try to keep the program maintained. -Other contributors and patches are welcomed. Please read the FAQ first. You -can come ask questions in #gaim on irc.openprojects.net. +PROTOCOL INFORMATION +==================== + +Each protocol is hacked by both Rob and Eric, though there is one person +that kind of "owns" a protocol (mostly indicating that they were the +person that originally wrote it). Their name will be next to the protocol; +they're the people to complain to when something doesn't work ;). + + +TOC (Rob) +=== + +You shouldn't use TOC, you should use Oscar instead. TOC can sync your +buddy list with the server (if it's not too long), and can respond to file +transfer requests (both sending and receiving). Other than that, there's +nothing it can do that Oscar can't, yet. The TOC protocol doesn't allow +retrieval of away messages; isn't capable of sending or receiving buddy +icons; it also can't make file transfer requests. + + +Oscar (Eric) +===== + +Oscar is the default protocol. It is recommended that you use Oscar for +both AIM and ICQ, as TOC isn't very featureful and the old ICQ protocol no +longer works. + +For AIM, Oscar can get people's away messages. It can request and accept +Direct IM connections, but it cannot yet transfer files through this (or +through any other means). It can send and receive buddy icons if you have +GdkPixbuf. + +For ICQ, it supports nearly everything that the old ICQ plugin supported, +which isn't much. To use Oscar for ICQ, enter your ICQ UIN as the +screenname. The default host/port will work. + + +Yahoo (Eric) +===== + +Yahoo is currently using the new YMSG protocol that newer official Yahoo +clients are using. This protocol is much better than the old one, and +tends to be somewhat more reliable. However, the Yahoo service is still +flaky at best. Group chats aren't supported yet. + + +IRC (Eric) +=== + +There are three ways to join an IRC chat room. The first is the File->Join +A Chat menu option in the Buddy List window. The second is the "Chat" +button at the bottom of the buddy list. The third is to type "/join #name" +in an IM window where the "Send Message As" menu is set to your IRC +account. There are other / commands that work in IM and Chat windows for +IRC, /help will give you a list of them. + + +MSN (Eric) +=== + +With MSN you can join a conversation with several people, but you can't +invite people from the IM window yet. + + +ICQ (Eric) +=== + +The ICQ plugin is deprecated and will probably be removed soon. The +protocol only marginally works. You should use Oscar for ICQ. + + +Jabber (Eric) +====== + +Transports aren't currently supported at all, though if you have a +transport already subscribed Gaim will use it (you can't add or remove +transports though). In order to use a server other than jabber.org, set +your username to include the server, e.g. war...@my.... This +is the actual format of the Jabber ID anyway; Jabber is email with online +notification. + + +Napster (Rob) +======= + +Heh. Ok, so I (Rob) am on crack! Gaim can sign on/off of Napster, +add/remove people to your hotlist (buddylist) as well as chat privately +and in chat rooms. You can search for files and browse a list of other +user's files. You can currently download files as long as the person +you're retrieving files from is not firewalled. + + +Zephyr (Eric) +====== + +Let me start off by saying how much I really despise Zephyr. They do a +lot of things that make me realize why this never caught on. For those +of you who are unfortunate enough to feel compelling need to use this, +gaim now has a Zephyr plugin. It can currently sign on/off, handles +presence/buddy lists (it even imports your .anyone file!), and can +send/receive personal messages. A lot of stuff is missing, this is just +a real rough first stab at it. + + +Gadu-Gadu (Eric) +========= + +I really shouldn't be taking credit for Gadu-Gadu, I'm just the person who +commits the patches that Arkadiusz Miskiewicz gives me. Gadu-Gadu is an IM +system most similar to ICQ that is quite popular in Poland. It can manage +your server-side buddy list through the Protocol Actions menu. Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- configure.ac 2001/12/08 09:48:51 1.38 +++ configure.ac 2001/12/09 13:18:58 1.39 @@ -167,11 +167,11 @@ fi if test "x$enable_gnome" != "xyes" -a "x$enable_gtk2" != "xyes" ; then - AM_PATH_GLIB(1.2.3,,AC_MSG_ERROR([ + AM_PATH_GLIB(1.2.5,,AC_MSG_ERROR([ *** GLib is required to build Gaim; please make sure you have the GLib *** development headers installed. The latest version of GLib is *** always available at http://www.gtk.org/.])) - AM_PATH_GTK(1.2.3,,AC_MSG_ERROR([ + AM_PATH_GTK(1.2.5,,AC_MSG_ERROR([ *** GTK+ is required to build Gaim; please make sure you have the GTK+ *** development headers installed. The latest version of GTK+ is *** always available at http://www.gtk.org/.])) Index: gaim.spec.in =================================================================== RCS file: /cvsroot/gaim/gaim/gaim.spec.in,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- gaim.spec.in 2001/11/29 20:50:42 1.31 +++ gaim.spec.in 2001/12/09 13:18:58 1.32 @@ -17,7 +17,7 @@ Source: %{name}-%{version}.tar.gz Packager: Rob Flynn <ro...@ma...> BuildRoot: /var/tmp/%{name}-%{version}-root -Requires: gtk+ >= 1.2.3 +Requires: gtk+ >= 1.2.5 %description Gaim is NOT affiliated with or endorsed by AOL. @@ -38,7 +38,7 @@ %package applet Summary: A Gnome client compatible with AOL's 'Instant Messenger' Group: Applications/Internet -Requires: gtk+ >= 1.2.3 +Requires: gtk+ >= 1.2.5 %description applet Gaim allows you to talk to anyone using AOL's --- BUGS DELETED --- --- STATUS DELETED --- |