You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sean E. <sea...@us...> - 2002-03-11 23:02:58
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv28812/src/protocols/oscar Modified Files: oscar.c Log Message: whoops. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- oscar.c 7 Mar 2002 02:19:37 -0000 1.111 +++ oscar.c 11 Mar 2002 23:02:54 -0000 1.112 @@ -3459,7 +3459,7 @@ static void oscar_format_screenname(struct gaim_connection *gc, char *nick) { struct oscar_data *od = gc->proto_data; - if (!strcmp(normalize(nick), gc->username)) { + if (!strcmp(normalize(nick), normalize(gc->username))) { if (!aim_getconn_type(od->sess, AIM_CONN_TYPE_AUTH)) { od->setnick = TRUE; od->newsn = g_strdup(nick); |
From: Sean E. <sea...@us...> - 2002-03-11 06:14:50
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv15460/src/protocols/irc Modified Files: irc.c Log Message: Told you I should have looked it over better. It still has issues... I'll do them later. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- irc.c 11 Mar 2002 04:41:12 -0000 1.71 +++ irc.c 11 Mar 2002 06:14:46 -0000 1.72 @@ -1432,6 +1432,7 @@ struct dcc_chat *dccchat = find_dcc_chat(gc, who); struct irc_data *id = gc->proto_data; g_free(tmp); + what = str->str; if (*what != '/') { unsigned int max = 440 - strlen(who); char t; @@ -1439,30 +1440,30 @@ t = what[max]; what[max] = 0; if (dccchat) { - g_snprintf(buf, sizeof(buf), "%s\r\n", str->str); + g_snprintf(buf, sizeof(buf), "%s\r\n", what); irc_write(dccchat->fd, buf, strlen(buf)); g_string_free(str, TRUE); return 1; } - g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str); + g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what); irc_write(id->fd, buf, strlen(buf)); what[max] = t; what = what + max; } if (dccchat) { - g_snprintf(buf, sizeof(buf), "%s\r\n", str->str); + g_snprintf(buf, sizeof(buf), "%s\r\n", what); irc_write(dccchat->fd, buf, strlen(buf)); g_string_free(str, TRUE); return 1; } - g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str); + g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what); irc_write(id->fd, buf, strlen(buf)); g_string_free(str, TRUE); return 1; } what++; - process_data_init(pdibuf, str->str, word, word_eol, TRUE); + process_data_init(pdibuf, what, word, word_eol, TRUE); g_string_free(str, TRUE); if (!g_strcasecmp(pdibuf, "ME")) { if (dccchat) { |
From: Sean E. <sea...@us...> - 2002-03-11 04:41:15
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv31258/src/protocols/irc Modified Files: irc.c Log Message: DCC Chat and conversion of <B>, <I>, and <U> to mIRC formatting. I probably should have looked over this before committing. I'll learn my mistakes the hard way. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- irc.c 10 Mar 2002 00:59:32 -0000 1.70 +++ irc.c 11 Mar 2002 04:41:12 -0000 1.71 @@ -25,7 +25,7 @@ #include <config.h> - +#include <fcntl.h> #include <unistd.h> #include <errno.h> #include <string.h> @@ -47,6 +47,18 @@ #define USEROPT_SERV 0 #define USEROPT_PORT 1 +struct dcc_chat +{ + struct gaim_connection *gc; + char ip_address[12]; + int port; + int fd; + int inpa; + char nick[80]; +}; + +GSList *dcc_chat_list = NULL; + struct irc_data { int fd; gboolean online; @@ -68,6 +80,27 @@ GString *liststr; }; +struct dcc_chat * +find_dcc_chat (struct gaim_connection *gc, char *nick) +{ + GSList *tmp; + struct dcc_chat *data; + tmp = dcc_chat_list; + while (tmp != NULL) + { + data = (struct dcc_chat *) (tmp)->data; + if (data + && data->nick + && strcmp (nick, data->nick) == 0 + && gc == data->gc) + { + return data; + } + tmp = tmp->next; + } + return NULL; +} + static char *irc_name() { return "IRC"; @@ -222,6 +255,46 @@ } } +static GString *encode_html(char *msg) +{ + GString *str = g_string_new(""); + char *cur = msg, *end = msg; + gboolean bold = FALSE, underline = FALSE, italics = FALSE; + + while ((end = strchr(cur, '<'))) { + *end = 0; + str = g_string_append(str, cur); + cur = ++end; + if (!g_strncasecmp(cur, "B>", 2)) { + bold = TRUE; + str = g_string_append_c(str, '\2'); + cur = cur + 2; + } else if (!g_strncasecmp(cur, "I>", 2)) { /* use bold for italics too */ + italics = TRUE; + str = g_string_append_c(str, '\2'); + cur = cur + 2; + } else if (!g_strncasecmp(cur, "U>", 2)) { + underline = TRUE; + str = g_string_append_c(str, '\37'); + cur = cur + 2; + } else if (!g_strncasecmp(cur, "/B>", 3) && bold) { + bold = FALSE; + str = g_string_append_c(str, '\2'); + cur = cur + 3; + } else if (!g_strncasecmp(cur, "/I>", 3) && italics) { + bold = FALSE; + str = g_string_append_c(str, '\2'); + cur = cur + 3; + } else if (!g_strncasecmp(cur, "/U>", 3) && underline) { + bold = FALSE; + str = g_string_append_c(str, '\37'); + cur = cur + 3; + } + } + str = g_string_append(str, cur); + return str; +} + static GString *decode_html(char *msg) { GString /* oo la la */ *str = g_string_new(""); @@ -326,6 +399,58 @@ g_string_free(str, TRUE); } +static void dcc_chat_cancel(void *, struct dcc_chat *); + +void +dcc_chat_in (gpointer data, gint source, GaimInputCondition condition) +{ + struct dcc_chat *chat = data; + gchar buffer[IRC_BUF_LEN]; + gchar buf[128]; + int n = 0, l; + struct conversation *convo; + debug_printf("THIS IS TOO MUCH EFFORT\n"); + n = read (chat->fd, buffer, IRC_BUF_LEN); + if (n > 0) + { + + /* Strip the terminating \n */ + l = 0; + while (buffer[l] && buffer[l] != '\n' && l <= n) + l++; + buffer[l] = '\000'; + + /* Convert to HTML */ + debug_printf ("DCC Message from: %s\n", chat->nick); + irc_got_im(chat->gc, chat->nick, buffer, 0, time(NULL)); + } + + else { + g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"), + chat->nick); + convo = new_conversation (chat->nick); + write_to_conv (convo, buf, WFLAG_SYSTEM, NULL, + time ((time_t) NULL), -1); + dcc_chat_cancel (NULL,chat); + } +} + +void dcc_chat_callback (gpointer data, gint source, GaimInputCondition condition) { + struct dcc_chat *chat = data; + struct conversation *convo = new_conversation (chat->nick); + char buf[IRC_BUF_LEN]; + chat->fd = source; + g_snprintf (buf, sizeof buf, + "DCC Chat with %s established", + chat->nick); + write_to_conv (convo, buf, WFLAG_SYSTEM, NULL, + time ((time_t) NULL), -1); + debug_printf ("Chat with %s established\n", chat->nick); + dcc_chat_list = g_slist_append (dcc_chat_list, chat); + gaim_input_remove(chat->inpa); + chat->inpa = gaim_input_add(source, GAIM_INPUT_READ, dcc_chat_in, chat); +} + static void irc_got_chat_in(struct gaim_connection *gc, int id, char *who, int whisper, char *msg, time_t t) { GString *str = decode_html(msg); @@ -779,6 +904,33 @@ } } +static void dcc_chat_init(gpointer obj, struct dcc_chat *data) { + struct dcc_chat * chat = g_new0(struct dcc_chat, 1); + + memcpy(chat, data, sizeof(struct dcc_chat)); /* we have to make a new one + * because the old one get's freed by + * dcc_chat_cancel. */ + proxy_connect(chat->ip_address, chat->port, dcc_chat_callback, chat); +} + +static void dcc_chat_cancel(gpointer obj, struct dcc_chat *data){ + if (find_dcc_chat(data->gc, data->nick)) { + dcc_chat_list = g_slist_remove(dcc_chat_list, data); + gaim_input_remove (data->inpa); + close (data->fd); + } + g_free(data); +} + +static void irc_convo_closed(struct gaim_connection *gc, char *who) +{ + struct dcc_chat *dchat = find_dcc_chat(gc, who); + if (!dchat) + return; + + dcc_chat_cancel(NULL, dchat); +} + static void handle_ctcp(struct gaim_connection *gc, char *to, char *nick, char *msg, char *word[], char *word_eol[]) { @@ -798,6 +950,18 @@ handle_privmsg(gc, to, nick, tmp); g_free(tmp); } + if (!g_strncasecmp(msg, "DCC CHAT", 8)) { + char **chat_args = g_strsplit(msg, " ", 5); + char ask[1024]; + struct dcc_chat * dccchat = g_new0(struct dcc_chat, 1); + dccchat->gc = gc; + g_snprintf(dccchat->ip_address, sizeof(dccchat->ip_address), chat_args[3]); + dccchat->port=atoi(chat_args[4]); + g_snprintf(dccchat->nick, sizeof(dccchat->nick), nick); + g_snprintf(ask, sizeof(ask), _("%s has requested a DCC chat. " + "Would you like to establish the direct connection?"), nick); + do_ask_dialog(ask, dccchat, dcc_chat_init, dcc_chat_cancel); + } /* XXX should probably write_to_conv or something here */ } @@ -1263,27 +1427,49 @@ char buf[IRC_BUF_LEN]; char pdibuf[IRC_BUF_LEN]; char *word[PDIWORDS], *word_eol[PDIWORDS]; + char *tmp = g_strdup(what); + GString *str = encode_html(tmp); + struct dcc_chat *dccchat = find_dcc_chat(gc, who); struct irc_data *id = gc->proto_data; + g_free(tmp); if (*what != '/') { unsigned int max = 440 - strlen(who); char t; while (strlen(what) > max) { t = what[max]; what[max] = 0; - g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what); + if (dccchat) { + g_snprintf(buf, sizeof(buf), "%s\r\n", str->str); + irc_write(dccchat->fd, buf, strlen(buf)); + g_string_free(str, TRUE); + return 1; + } + g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str); irc_write(id->fd, buf, strlen(buf)); what[max] = t; what = what + max; } - g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what); + if (dccchat) { + g_snprintf(buf, sizeof(buf), "%s\r\n", str->str); + irc_write(dccchat->fd, buf, strlen(buf)); + g_string_free(str, TRUE); + return 1; + } + g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str); irc_write(id->fd, buf, strlen(buf)); + g_string_free(str, TRUE); return 1; } - + what++; - process_data_init(pdibuf, what, word, word_eol, TRUE); - - if (!g_strcasecmp(pdibuf, "ME")) { + process_data_init(pdibuf, str->str, word, word_eol, TRUE); + g_string_free(str, TRUE); + if (!g_strcasecmp(pdibuf, "ME")) { + if (dccchat) { + g_snprintf(buf, sizeof(buf), "\001ACTION %s\001\r\n", word_eol[2]); + irc_write(dccchat->fd, buf, strlen(buf)); + return 1; + } g_snprintf(buf, sizeof(buf), "PRIVMSG %s :\001ACTION %s\001\r\n", who, word_eol[2]); irc_write(id->fd, buf, strlen(buf)); return 1; @@ -1518,6 +1704,91 @@ return irc_icon_xpm; } +static int getlocalip(char *ip) /* Thanks, libfaim */ +{ + struct hostent *hptr; + char localhost[129]; + long unsigned add; + + /* XXX if available, use getaddrinfo() */ + /* XXX allow client to specify which IP to use for multihomed boxes */ + + if (gethostname(localhost, 128) < 0) + return -1; + + if (!(hptr = gethostbyname(localhost))) + return -1; + + memcpy(&add, hptr->h_addr_list[0], 4); + add = htonl(add); + g_snprintf(ip, 11, "%lu", add); + + return 0; +} + +static void dcc_chat_connected(gpointer data, gint source, GdkInputCondition condition) +{ + struct dcc_chat *chat = data; + struct conversation *convo; + char buf[128]; + struct sockaddr_in addr; + int addrlen = sizeof (addr); + addr.sin_family = AF_INET; + addr.sin_port = htons (chat->port); + addr.sin_addr.s_addr = INADDR_ANY; + chat->fd = accept (chat->fd, (struct sockaddr *) (&addr), &addrlen); + if (!chat->fd) + { + dcc_chat_cancel (NULL,chat); + convo = new_conversation (chat->nick); + g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"), + chat->nick); + write_to_conv (convo, buf, WFLAG_SYSTEM, NULL, + time ((time_t) NULL), -1); + return; + } + chat->inpa = + gaim_input_add (chat->fd, GAIM_INPUT_READ, dcc_chat_in, chat); + convo = new_conversation (chat->nick); + g_snprintf (buf, sizeof buf, "DCC Chat with %s established", + chat->nick); + write_to_conv (convo, buf, WFLAG_SYSTEM, NULL, time ((time_t) NULL), -1); + debug_printf ("Chat with %s established\n", chat->nick); + dcc_chat_list = g_slist_append (dcc_chat_list, chat); +} + +static void irc_start_chat(struct gaim_connection *gc, char *who) { + struct dcc_chat *chat; + int len; + struct sockaddr_in addr; + char buf[200]; + + /* Create a socket */ + chat = g_new0 (struct dcc_chat, 1); + chat->fd = socket (AF_INET, SOCK_STREAM, 0); + chat->gc = gc; + g_snprintf (chat->nick, sizeof (chat->nick), "%s", who); + if (chat->fd < 0) { + dcc_chat_cancel (NULL,chat); + return; + } + addr.sin_family = AF_INET; + addr.sin_port = 0; + addr.sin_addr.s_addr = INADDR_ANY; + bind (chat->fd, (struct sockaddr *) &addr, sizeof (addr)); + listen (chat->fd, 1); + len = sizeof (addr); + getsockname (chat->fd, (struct sockaddr *) &addr, &len); + chat->port = ntohs (addr.sin_port); + getlocalip(chat->ip_address); + chat->inpa = + gaim_input_add (chat->fd, GAIM_INPUT_READ, dcc_chat_connected, + chat); + snprintf (buf, sizeof buf, "\001DCC CHAT chat %s %d\001\n", + chat->ip_address, chat->port); + irc_send_im (gc, who, buf, 0); +} + static void irc_get_info(struct gaim_connection *gc, char *who) { struct irc_data *idata = gc->proto_data; @@ -1542,7 +1813,11 @@ pbm->callback = irc_get_info; pbm->gc = gc; m = g_list_append(m, pbm); - + pbm = g_new0(struct proto_buddy_menu, 1); + pbm->label = _("DCC Chat"); + pbm->callback = irc_start_chat; + pbm->gc = gc; + m = g_list_append(m, pbm); return m; } @@ -1569,6 +1844,7 @@ ret->get_info = irc_get_info; ret->buddy_menu = irc_buddy_menu; ret->chat_invite = irc_chat_invite; + ret->convo_closed = irc_convo_closed; my_protocol = ret; } |
From: Sean E. <sea...@us...> - 2002-03-11 04:41:15
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv31258 Modified Files: ChangeLog Log Message: DCC Chat and conversion of <B>, <I>, and <U> to mIRC formatting. I probably should have looked over this before committing. I'll learn my mistakes the hard way. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.407 retrieving revision 1.408 diff -u -d -r1.407 -r1.408 --- ChangeLog 8 Mar 2002 00:58:38 -0000 1.407 +++ ChangeLog 11 Mar 2002 04:41:12 -0000 1.408 @@ -12,6 +12,8 @@ * Yahoo! will tell you when your buddies are playing Yahoo! games and give you the ability to join them * Yahoo! can receive offline messages + * IRC can do DCC chat. + * IRC will convert HTML formatting to mIRC formatting. version 0.53 (02/28/2002): * Updated Polish Translation (thanks Przemyslaw Sulek) |
From: Sean E. <sea...@us...> - 2002-03-10 00:59:37
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv31694/src/protocols/irc Modified Files: irc.c Log Message: IRC Buddy list bugfix. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- irc.c 22 Dec 2001 08:08:36 -0000 1.69 +++ irc.c 10 Mar 2002 00:59:32 -0000 1.70 @@ -351,9 +351,12 @@ while (m) { struct buddy *b = m->data; char *tmp = g_strdup(b->name); - char *x; + char *x, *l; g_strdown(tmp); x = strstr(id->str->str, tmp); + l = x + strlen(b->name); + if (x && (*l != ' ' && *l != 0)) + x = 0; if (!b->present && x) serv_got_update(gc, b->name, 1, 0, 0, 0, 0, 0); else if (b->present && !x) |
From: Rob F. <rob...@us...> - 2002-03-09 19:56:31
|
Update of /cvsroot/gaim/gaim/doc In directory usw-pr-cvs1:/tmp/cvs-serv30978 Modified Files: gaims_funniest_home_convos.txt Log Message: ;-) Index: gaims_funniest_home_convos.txt =================================================================== RCS file: /cvsroot/gaim/gaim/doc/gaims_funniest_home_convos.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gaims_funniest_home_convos.txt 18 Oct 2001 12:12:36 -0000 1.4 +++ gaims_funniest_home_convos.txt 9 Mar 2002 19:56:26 -0000 1.5 @@ -201,3 +201,12 @@ 03:32:48 Eric Warmenhoven: holy crap 03:33:00 RobFlynn: Sesquipedalians such as idiosyncracy are often times considered ambiguous. Why use a large word when a dimunitve one will suffice? + + +-- + +(14:54:25) SeanEgan: are you coding now? +(14:55:33) RobFlynn: Nah I gotta go buy pants. +(14:55:37) SeanEgan: haha +(14:55:40) SeanEgan: that was so random + |
From: Sean E. <sea...@us...> - 2002-03-09 18:45:34
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv16759/pixmaps Modified Files: Makefile.am Log Message: Need this. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- Makefile.am 5 Mar 2002 23:20:51 -0000 1.62 +++ Makefile.am 9 Mar 2002 18:45:31 -0000 1.63 @@ -94,6 +94,7 @@ smile_icon.xpm \ speaker.xpm \ status-away.xpm \ + status-game.xpm \ status-here.xpm \ status-idle.xpm \ strike.xpm \ |
From: Sean E. <sea...@us...> - 2002-03-09 18:39:50
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv15632/src Modified Files: gaim.h plugins.c prefs.c sound.c Log Message: Reworked sound preference by Robert McQueen. Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.310 retrieving revision 1.311 diff -u -d -r1.310 -r1.311 --- gaim.h 6 Mar 2002 00:18:02 -0000 1.310 +++ gaim.h 9 Mar 2002 18:39:46 -0000 1.311 @@ -276,6 +276,7 @@ #define OPT_SOUND_NAS 0x00004000 #define OPT_SOUND_ARTSC 0x00008000 #define OPT_SOUND_ESD 0x00010000 +#define OPT_SOUND_CMD 0x00020000 #define BUDDY_ARRIVE 0 #define BUDDY_LEAVE 1 Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- plugins.c 15 Nov 2001 22:47:03 -0000 1.86 +++ plugins.c 9 Mar 2002 18:39:46 -0000 1.87 @@ -189,7 +189,7 @@ gtk_widget_show(tophbox); /* Left side: frame with list of plugin file names */ - frame = gtk_frame_new(_("Plugins")); + frame = gtk_frame_new(_("Loaded Plugins")); gtk_box_pack_start(GTK_BOX(tophbox), frame, FALSE, FALSE, 0); gtk_widget_set_usize(frame, 140, -1); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.215 retrieving revision 1.216 diff -u -d -r1.215 -r1.216 --- prefs.c 6 Mar 2002 05:26:58 -0000 1.215 +++ prefs.c 9 Mar 2002 18:39:46 -0000 1.216 @@ -1519,7 +1519,7 @@ gaim_button(label, &sound_options, opt, hbox); - button = gtk_button_new_with_label(_("Play")); + button = gtk_button_new_with_label(_("Test")); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 3); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(test_sound), (void *)snd); gtk_widget_show(button); @@ -1556,8 +1556,14 @@ static void set_sound_driver(GtkWidget *w, int option) { + if (option == OPT_SOUND_CMD) + gtk_widget_set_sensitive(sndcmd, TRUE); + else + gtk_widget_set_sensitive(sndcmd, FALSE); + sound_options &= ~(OPT_SOUND_NORMAL | OPT_SOUND_BEEP | - OPT_SOUND_NAS | OPT_SOUND_ARTSC | OPT_SOUND_ESD); + OPT_SOUND_NAS | OPT_SOUND_ARTSC | + OPT_SOUND_ESD | OPT_SOUND_CMD); sound_options |= option; save_prefs(); } @@ -1671,7 +1677,7 @@ i++; #endif - opt = gtk_menu_item_new_with_label("Native"); + opt = gtk_menu_item_new_with_label("Internal"); gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_sound_driver), (gpointer)OPT_SOUND_NORMAL); @@ -1680,6 +1686,15 @@ if ((sound_options & OPT_SOUND_NORMAL) && !driver) driver = i; i++; + opt = gtk_menu_item_new_with_label("Command"); + gtk_signal_connect(GTK_OBJECT(opt), "activate", + GTK_SIGNAL_FUNC(set_sound_driver), + (gpointer)OPT_SOUND_CMD); + gtk_widget_show(opt); + gtk_menu_append(GTK_MENU(menu), opt); + if ((sound_options & OPT_SOUND_CMD) && !driver) driver = i; + i++; + gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), driver - 1); gtk_box_pack_start(GTK_BOX(hbox), omenu, FALSE, FALSE, 5); @@ -1693,7 +1708,7 @@ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); - label = gtk_label_new(_("Command to play sound files\n(%s for filename; internal if empty)")); + label = gtk_label_new(_("Command to play sound files\n(%s for filename)")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); @@ -1702,6 +1717,7 @@ gtk_entry_set_text(GTK_ENTRY(sndcmd), sound_cmd); gtk_box_pack_end(GTK_BOX(hbox), sndcmd, FALSE, FALSE, 5); gtk_signal_connect(GTK_OBJECT(sndcmd), "focus_out_event", GTK_SIGNAL_FUNC(sound_cmd_yeah), NULL); + gtk_widget_set_sensitive(sndcmd, (OPT_SOUND_CMD & sound_options)); gtk_widget_show(sndcmd); frame = gtk_frame_new(_("Events")); Index: sound.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/sound.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- sound.c 4 Mar 2002 19:15:12 -0000 1.49 +++ sound.c 9 Mar 2002 18:39:46 -0000 1.50 @@ -403,7 +403,7 @@ else if (pid == 0) { alarm(30); - if (sound_cmd[0]) { + if ((sound_options & OPT_SOUND_CMD) && sound_cmd[0]) { char *args[4]; char command[4096]; @@ -460,6 +460,12 @@ gdk_beep(); return; } + + else if ((sound_options & OPT_SOUND_CMD) && sound_cmd[0]) { + debug_printf("can't play internal sound with external command -- skipping\n"); + return; + } + pid = fork(); if (pid < 0) |
From: Rob F. <rob...@us...> - 2002-03-09 03:11:05
|
Update of /cvsroot/gaim/gaim/src/protocols In directory usw-pr-cvs1:/tmp/cvs-serv17098 Modified Files: Makefile.am Log Message: Bloop Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 7 Mar 2002 00:46:09 -0000 1.4 +++ Makefile.am 9 Mar 2002 03:11:02 -0000 1.5 @@ -1,4 +1,4 @@ -DIST_SUBDIRS = gg irc jabber msn napster oscar toc yahoo zephyr +DIST_SUBDIRS = gg irc jabber msn napster oscar toc yahoo zephyr icq if PRPLS |
From: Sean E. <sea...@us...> - 2002-03-08 18:12:58
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv20612/src/protocols/oscar Modified Files: conn.c Log Message: Wow. A typo. Index: conn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/conn.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- conn.c 2 Mar 2002 01:36:01 -0000 1.10 +++ conn.c 8 Mar 2002 18:12:55 -0000 1.11 @@ -184,7 +184,7 @@ } free(*deadconn); - deadconn = NULL; + *deadconn = NULL; return; } |
From: Sean E. <sea...@us...> - 2002-03-08 00:58:43
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26767/src Modified Files: conversation.c Log Message: Typing notification will go away if you're not using tabs (I don't know why you're not using tabs... they're so cool) Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.335 retrieving revision 1.336 diff -u -d -r1.335 -r1.336 --- conversation.c 6 Mar 2002 17:04:36 -0000 1.335 +++ conversation.c 8 Mar 2002 00:58:38 -0000 1.336 @@ -1699,6 +1699,8 @@ if ((c->is_chat && (chat_options & OPT_CHAT_POPUP)) || (!c->is_chat && (im_options & OPT_IM_POPUP))) gdk_window_show(c->window->window); + if (flags & WFLAG_RECV) + reset_typing(g_strdup(c->name)); /* tab highlighting */ if (c->is_chat && !(chat_options & OPT_CHAT_ONE_WINDOW)) /* if chat but not tabbed chat */ @@ -1737,7 +1739,7 @@ GList *ws = (c->is_chat ? chats : conversations); GtkWidget *label = gtk_notebook_get_tab_label(notebook, gtk_notebook_get_nth_page(notebook, - offs + g_list_index(ws, c))); + offs + g_list_index(ws, c))); GtkStyle *style; style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) @@ -1760,8 +1762,6 @@ gtk_widget_set_style(label, style); gtk_style_unref(style); } - if (flags & WFLAG_RECV) - reset_typing(g_strdup(c->name)); } void update_progress(struct conversation *c, float percent) { |
From: Sean E. <sea...@us...> - 2002-03-08 00:58:42
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv26767 Modified Files: ChangeLog Log Message: Typing notification will go away if you're not using tabs (I don't know why you're not using tabs... they're so cool) Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.406 retrieving revision 1.407 diff -u -d -r1.406 -r1.407 --- ChangeLog 7 Mar 2002 07:26:12 -0000 1.406 +++ ChangeLog 8 Mar 2002 00:58:38 -0000 1.407 @@ -11,6 +11,7 @@ * Numerous bugfixes * Yahoo! will tell you when your buddies are playing Yahoo! games and give you the ability to join them + * Yahoo! can receive offline messages version 0.53 (02/28/2002): * Updated Polish Translation (thanks Przemyslaw Sulek) |
From: Sean E. <sea...@us...> - 2002-03-07 20:57:20
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv23523/src/protocols/yahoo Modified Files: yahoo.c Log Message: Offline messages in Yahoo! and a typo noticed by Brendan Sergei. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- yahoo.c 7 Mar 2002 18:53:37 -0000 1.36 +++ yahoo.c 7 Mar 2002 20:57:16 -0000 1.37 @@ -524,7 +524,7 @@ char *from = NULL; time_t tm = time(NULL); GSList *l = pkt->hash; - + while (l) { struct yahoo_pair *pair = l->data; if (pair->key == 4) @@ -536,7 +536,7 @@ l = l->next; } - if (pkt->status <= 1) { + if (pkt->status <= 1 || pkt->status == 5) { char *m; int i, j; strip_linefeed(msg); @@ -715,8 +715,8 @@ pkt = yahoo_packet_new(0, 0, 0); pkt->service = yahoo_get16(yd->rxqueue + pos); pos += 2; - debug_printf("Yahoo Service: 0x%02x Status: %d\n", pkt->service, pkt->status); pkt->status = yahoo_get32(yd->rxqueue + pos); pos += 4; + debug_printf("Yahoo Service: 0x%02x Status: %d\n", pkt->service, pkt->status); pkt->id = yahoo_get32(yd->rxqueue + pos); pos += 4; yahoo_packet_read(pkt, yd->rxqueue + pos, pktlen); |
From: Sean E. <sea...@us...> - 2002-03-07 20:57:20
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv23523 Modified Files: TODO Log Message: Offline messages in Yahoo! and a typo noticed by Brendan Sergei. Index: TODO =================================================================== RCS file: /cvsroot/gaim/gaim/TODO,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- TODO 17 Feb 2002 18:13:13 -0000 1.128 +++ TODO 7 Mar 2002 20:57:16 -0000 1.129 @@ -114,7 +114,7 @@ Then, of course, are all the Bugs that need to be fixed - http://sourceforge.net/tracker/?atid=100235&group_id=235&func=broswe + http://sourceforge.net/tracker/?atid=100235&group_id=235&func=browse and the Feature Requests. SourceForge should really allow users to vote on feature requests and bugs..... http://sourceforge.net/tracker/?atid=350235&group_id=235&func=browse |
From: Sean E. <sea...@us...> - 2002-03-07 19:08:07
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv15637/src/protocols/msn Modified Files: msn.c Log Message: Fixes a segfault in Yahoo, and a disconnection error in MSN. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- msn.c 7 Mar 2002 04:12:25 -0000 1.57 +++ msn.c 7 Mar 2002 18:53:36 -0000 1.58 @@ -1813,6 +1813,11 @@ struct msn_data *md = gc->proto_data; char buf[MSN_BUF_LEN]; + if (strlen(url_encode(entry)) > 387) { + do_error_dialog("Friendly name too long.", "MSN Error"); + return; + } + g_snprintf(buf, sizeof(buf), "REA %d %s %s\r\n", ++md->trId, gc->username, url_encode(entry)); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error"); |
From: Sean E. <sea...@us...> - 2002-03-07 19:08:06
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv15637/src/protocols/yahoo Modified Files: yahoo.c Log Message: Fixes a segfault in Yahoo, and a disconnection error in MSN. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- yahoo.c 7 Mar 2002 07:26:12 -0000 1.35 +++ yahoo.c 7 Mar 2002 18:53:37 -0000 1.36 @@ -496,7 +496,7 @@ } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { struct buddy *bud = find_buddy(gc, from); void *free1=NULL, *free2=NULL; - if (!bud) + if (!bud) debug_printf("%s is playing a game, and doesn't want you to know.\n"); if (*stat == '1') { if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { @@ -504,14 +504,16 @@ g_free(free2); } g_hash_table_insert (yd->games, g_strdup(from), g_strdup(game)); - serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); + if (bud) + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); } else { if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { g_free(free1); g_free(free2); g_hash_table_remove (yd->games, from); } - serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); + if (bud) + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); } } } |
From: Sean E. <sea...@us...> - 2002-03-07 07:26:16
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv5000/pixmaps Added Files: status-game.xpm Log Message: When your Yahoo! contacts join or quit games, their icons will show a die, and you can choose to join them in that game through an option in the right click menu. Thanks Brian Macke! --- NEW FILE: status-game.xpm --- /* XPM */ static char * status_game_xpm[] = { "12 12 14 1", " c None", ". c #FFFFFF", "+ c #838183", "@ c #000000", "# c #000083", "$ c #008183", "% c #C5C2FF", "& c #C0C0C0", "* c #808000", "= c #FFFF00", "- c #000080", "; c #808080", "> c #800000", ", c #FF0000", " &&@@**&& ", " &@@====**& ", "&@==....=.*&", "&@=...====*&", "@=..-.=-.==*", "@=.&;&&;&==*", ".+@####====*", "+$%%+%%=,==*", "#.....$>==*&", "#.#...$===*&", "#.....$=**& ", "#...#.$*&& "}; |
From: Sean E. <sea...@us...> - 2002-03-07 07:26:15
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv5000/src/protocols/yahoo Modified Files: yahoo.c Log Message: When your Yahoo! contacts join or quit games, their icons will show a die, and you can choose to join them in that game through an option in the right click menu. Thanks Brian Macke! Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- yahoo.c 4 Mar 2002 04:18:02 -0000 1.34 +++ yahoo.c 7 Mar 2002 07:26:12 -0000 1.35 @@ -47,6 +47,7 @@ #include "pixmaps/status-away.xpm" #include "pixmaps/status-here.xpm" #include "pixmaps/status-idle.xpm" +#include "pixmaps/status-game.xpm" #define YAHOO_DEBUG @@ -92,7 +93,7 @@ YAHOO_SERVICE_GAMELOGOFF, YAHOO_SERVICE_GAMEMSG = 0x2a, YAHOO_SERVICE_FILETRANSFER = 0x46, - YAHOO_SERVICE_TYPING = 0x4B, /* may have other uses too */ + YAHOO_SERVICE_NOTIFY = 0x4B, YAHOO_SERVICE_LIST = 0x55, YAHOO_SERVICE_ADDBUDDY = 0x83, YAHOO_SERVICE_REMBUDDY = 0x84 @@ -115,12 +116,14 @@ YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */ YAHOO_STATUS_TYPING = 0x16 }; +#define YAHOO_STATUS_GAME 0x2 /* Games don't fit into the regular status model */ struct yahoo_data { int fd; guchar *rxqueue; int rxlen; GHashTable *hash; + GHashTable *games; int current_status; gboolean logged_in; }; @@ -347,8 +350,9 @@ struct yahoo_packet *newpkt; char *name = NULL; int state = 0; + int gamestate = 0; char *msg = NULL; - + while (l) { struct yahoo_pair *pair = l->data; @@ -390,10 +394,12 @@ serv_got_update(gc, name, 0, 0, 0, 0, 0, 0); break; } + if (g_hash_table_lookup(yd->games, name)) + gamestate = YAHOO_STATUS_GAME; if (state == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, name, 1, 0, 0, 0, 0, 0); + serv_got_update(gc, name, 1, 0, 0, 0, gamestate, 0); else - serv_got_update(gc, name, 1, 0, 0, 0, (state << 1) | UC_UNAVAILABLE, 0); + serv_got_update(gc, name, 1, 0, 0, 0, (state << 2) | UC_UNAVAILABLE | gamestate, 0); if (state == YAHOO_STATUS_CUSTOM) { gpointer val = g_hash_table_lookup(yd->hash, name); if (val) { @@ -461,13 +467,14 @@ do_export(gc); } -static void yahoo_process_typing(struct gaim_connection *gc, struct yahoo_packet *pkt) +static void yahoo_process_notify(struct gaim_connection *gc, struct yahoo_packet *pkt) { char *msg = NULL; char *from = NULL; - char *typing = NULL; + char *stat = NULL; + char *game = NULL; GSList *l = pkt->hash; - + struct yahoo_data *yd = (struct yahoo_data*) gc->proto_data; while (l) { struct yahoo_pair *pair = l->data; if (pair->key == 4) @@ -475,13 +482,38 @@ if (pair->key == 49) msg = pair->value; if (pair->key == 13) - typing = pair->value; + stat = pair->value; + if (pair->key == 14) + game = pair->value; l = l->next; } - if (*typing == '1') - serv_got_typing(gc, from, 0); - else - serv_got_typing_stopped(gc, from); + + if (!g_strncasecmp(msg, "TYPING", strlen("TYPING"))) { + if (*stat == '1') + serv_got_typing(gc, from, 0); + else + serv_got_typing_stopped(gc, from); + } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { + struct buddy *bud = find_buddy(gc, from); + void *free1=NULL, *free2=NULL; + if (!bud) + debug_printf("%s is playing a game, and doesn't want you to know.\n"); + if (*stat == '1') { + if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { + g_free(free1); + g_free(free2); + } + g_hash_table_insert (yd->games, g_strdup(from), g_strdup(game)); + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); + } else { + if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { + g_free(free1); + g_free(free2); + g_hash_table_remove (yd->games, from); + } + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); + } + } } static void yahoo_process_message(struct gaim_connection *gc, struct yahoo_packet *pkt) @@ -560,9 +592,9 @@ if (state == YAHOO_STATUS_AVAILABLE) serv_got_update(gc, name, 1, 0, 0, 0, 0, 0); else if (state == YAHOO_STATUS_IDLE) - serv_got_update(gc, name, 1, 0, 0, time(NULL) - 600, (state << 1), 0); + serv_got_update(gc, name, 1, 0, 0, time(NULL) - 600, (state << 2), 0); else - serv_got_update(gc, name, 1, 0, 0, 0, (state << 1) | UC_UNAVAILABLE, 0); + serv_got_update(gc, name, 1, 0, 0, 0, (state << 2) | UC_UNAVAILABLE, 0); if (state == YAHOO_STATUS_CUSTOM) { gpointer val = g_hash_table_lookup(yd->hash, name); if (val) { @@ -613,10 +645,12 @@ case YAHOO_SERVICE_LOGOFF: case YAHOO_SERVICE_ISAWAY: case YAHOO_SERVICE_ISBACK: + case YAHOO_SERVICE_GAMELOGON: + case YAHOO_SERVICE_GAMELOGOFF: yahoo_process_status(gc, pkt); break; - case YAHOO_SERVICE_TYPING: - yahoo_process_typing(gc, pkt); + case YAHOO_SERVICE_NOTIFY: + yahoo_process_notify(gc, pkt); break; case YAHOO_SERVICE_MESSAGE: case YAHOO_SERVICE_GAMEMSG: @@ -742,6 +776,7 @@ yd->fd = -1; yd->hash = g_hash_table_new(g_str_hash, g_str_equal); + yd->games = g_hash_table_new(g_str_hash, g_str_equal); if (!g_strncasecmp(user->proto_opt[USEROPT_PAGERHOST], "scs.yahoo.com", strlen("scs.yahoo.com"))) { /* As of this morning, Yahoo is no longer supporting its server at scs.yahoo.com @@ -775,6 +810,8 @@ struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; g_hash_table_foreach_remove(yd->hash, yahoo_destroy_hash, NULL); g_hash_table_destroy(yd->hash); + g_hash_table_foreach_remove(yd->games, yahoo_destroy_hash, NULL); + g_hash_table_destroy(yd->games); if (yd->fd >= 0) close(yd->fd); if (yd->rxqueue) @@ -787,11 +824,13 @@ static char **yahoo_list_icon(int uc) { - if ((uc >> 1) == YAHOO_STATUS_IDLE) + if ((uc >> 2) == YAHOO_STATUS_IDLE) return status_idle_xpm; - else if (uc == 0) - return status_here_xpm; - return status_away_xpm; + else if (uc & UC_UNAVAILABLE) + return status_away_xpm; + else if (uc & YAHOO_STATUS_GAME) + return status_game_xpm; + return status_here_xpm; } static char *yahoo_get_status_string(enum yahoo_status a) @@ -822,6 +861,22 @@ } } +static void yahoo_game(struct gaim_connection *gc, char *name) { + struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; + char *game = g_hash_table_lookup(yd->games, name); + char *t; + char url[256]; + + if (!game) + return; + t = game = g_strdup(strstr(game, "ante?room=")); + while (*t != '\t') + t++; + *t = 0; + g_snprintf(url, sizeof url, "http://games.yahoo.com/games/%s", game); + open_url(NULL, url); + g_free(game); +} static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) { GList *m = NULL; @@ -830,22 +885,45 @@ struct buddy *b = find_buddy(gc, who); /* this should never be null. if it is, segfault and get the bug report. */ static char buf[1024]; - - 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) - g_snprintf(buf, sizeof buf, "Status: %s", yahoo_get_status_string(b->uc >> 1)); - else - g_snprintf(buf, sizeof buf, "Custom Status: %s", - (char *)g_hash_table_lookup(yd->hash, b->name)); - pbm->label = buf; - pbm->callback = NULL; - pbm->gc = gc; - m = g_list_append(m, pbm); + static char buf2[1024]; + + if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) { + pbm = g_new0(struct proto_buddy_menu, 1); + if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM) + g_snprintf(buf, sizeof buf, + "Status: %s", yahoo_get_status_string(b->uc >> 2)); + else + g_snprintf(buf, sizeof buf, "Custom Status: %s", + (char *)g_hash_table_lookup(yd->hash, b->name)); + pbm->label = buf; + pbm->callback = NULL; + pbm->gc = gc; + m = g_list_append(m, pbm); + } + + if (b->uc | YAHOO_STATUS_GAME) { + char *game = g_hash_table_lookup(yd->games, b->name); + char *room; + if (!game) + return m; + if (game) { + char *t; + pbm = g_new0(struct proto_buddy_menu, 1); + if (!(room = strstr(game, "&follow="))) /* skip ahead to the url */ + return NULL; + while (*room && *room != '\t') /* skip to the tab */ + room++; + t = room++; /* room as now at the name */ + while (*t != '\n') + t++; /* replace the \n with a space */ + *t = ' '; + g_snprintf(buf2, sizeof buf2, "%s", room); + pbm->label = buf2; + pbm->callback = yahoo_game; + pbm->gc = gc; + m = g_list_append(m, pbm); + } + } return m; } @@ -917,8 +995,7 @@ int yahoo_send_typing(struct gaim_connection *gc, char *who, int typ) { struct yahoo_data *yd = gc->proto_data; - struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_TYPING, YAHOO_STATUS_TYPING, 0);//x6431de4f); - + struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_NOTIFY, YAHOO_STATUS_TYPING, 0); yahoo_packet_hash(pkt, 49, "TYPING"); yahoo_packet_hash(pkt, 1, gc->displayname); yahoo_packet_hash(pkt, 14, " "); |
From: Sean E. <sea...@us...> - 2002-03-07 07:26:15
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv5000 Modified Files: ChangeLog Log Message: When your Yahoo! contacts join or quit games, their icons will show a die, and you can choose to join them in that game through an option in the right click menu. Thanks Brian Macke! Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.405 retrieving revision 1.406 diff -u -d -r1.405 -r1.406 --- ChangeLog 6 Mar 2002 05:26:58 -0000 1.405 +++ ChangeLog 7 Mar 2002 07:26:12 -0000 1.406 @@ -9,6 +9,8 @@ * Option to globally disable Buddy Icon animation (Thanks Luke Schierer) * Numerous bugfixes + * Yahoo! will tell you when your buddies are playing Yahoo! + games and give you the ability to join them version 0.53 (02/28/2002): * Updated Polish Translation (thanks Przemyslaw Sulek) |
From: Sean E. <sea...@us...> - 2002-03-07 04:12:29
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv12106/src/protocols/msn Modified Files: msn.c Log Message: MSN won't bug you to move people from your deny list to your allow list--a bug introduced yesterday. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- msn.c 6 Mar 2002 05:26:58 -0000 1.56 +++ msn.c 7 Mar 2002 04:12:25 -0000 1.57 @@ -848,6 +848,7 @@ char *which, *who, *friend, *tmp = buf; struct msn_add_permit *ap; /* for any as yet undealt with buddies who've added you to their buddy list when you were off-line. How dare they! */ GSList *perm = gc->permit; /* current permit list */ + GSList *denyl = gc->deny; char msg[MSN_BUF_LEN]; int new = 1; int pos, tot; @@ -882,7 +883,11 @@ new = 0; perm = perm->next; } - + while(denyl) { + if(!g_strcasecmp(denyl->data, who)) + new = 0; + denyl = denyl->next; + } if(new) { debug_printf("Unresolved MSN RL entry\n"); ap = g_new0(struct msn_add_permit, 1); |
From: Rob F. <rob...@us...> - 2002-03-07 02:19:41
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv13042/protocols/oscar Modified Files: aim.h oscar.c ssi.c Log Message: Better SSI stuff? Thanks, KingAnt. Index: aim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- aim.h 3 Mar 2002 20:19:30 -0000 1.33 +++ aim.h 7 Mar 2002 02:19:36 -0000 1.34 @@ -1002,8 +1002,8 @@ #define AIM_SSI_TYPE_BUDDY 0x0000 #define AIM_SSI_TYPE_GROUP 0x0001 -#define AIM_SSI_TYPE_PERMITLIST 0x0002 -#define AIM_SSI_TYPE_DENYLIST 0x0003 +#define AIM_SSI_TYPE_PERMIT 0x0002 +#define AIM_SSI_TYPE_DENY 0x0003 #define AIM_SSI_TYPE_PDINFO 0x0004 #define AIM_SSI_TYPE_PRESENCEPREFS 0x0005 @@ -1019,25 +1019,23 @@ faim_export int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_reqdata(aim_session_t *sess, aim_conn_t *conn, time_t localstamp, fu16_t localrev); faim_export int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn); -faim_export int aim_ssi_additems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num); -faim_export int aim_ssi_moditems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num); -faim_export int aim_ssi_delitems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num); +faim_export int aim_ssi_addmoddel(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num, fu16_t subtype); faim_export int aim_ssi_modbegin(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_inlist(aim_session_t *sess, aim_conn_t *conn, char *name, fu16_t type); +faim_export char *aim_ssi_getparentgroup(aim_session_t *sess, aim_conn_t *conn, char *name); /* faim_export int aim_ssi_getpermdeny(aim_tlvlist_t *tlvlist); */ faim_export int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn); -faim_export int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num); +faim_export int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_addgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num); -faim_export int aim_ssi_addpermits(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num); -faim_export int aim_ssi_adddenies(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num); +faim_export int aim_ssi_addpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type); faim_export int aim_ssi_delbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num); +faim_export int aim_ssi_delmastergroup(aim_session_t *sess, aim_conn_t *conn); faim_export int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num); faim_export int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn); -faim_export int aim_ssi_delpermits(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num); -faim_export int aim_ssi_deldenies(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num); +faim_export int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type); faim_export int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, int permdeny); struct aim_icq_offlinemsg { Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- oscar.c 7 Mar 2002 00:46:10 -0000 1.110 +++ oscar.c 7 Mar 2002 02:19:37 -0000 1.111 @@ -2708,9 +2708,11 @@ if (odata->icq) { aim_remove_buddy(odata->sess, odata->conn, name); } else { - if (odata->sess->ssi.received_data) - while (aim_ssi_inlist(odata->sess, odata->conn, name, 0x0000) && !aim_ssi_delbuddies(odata->sess, odata->conn, group, &name, 1)) + if (odata->sess->ssi.received_data) { + char *ssigroup; + while (aim_ssi_inlist(odata->sess, odata->conn, name, 0x0000) && (ssigroup = aim_ssi_getparentgroup(odata->sess, odata->conn, name)) && !aim_ssi_delbuddies(odata->sess, odata->conn, ssigroup, &name, 1)) debug_printf("ssi: deleted buddy %s from group %s\n", name, group); + } } } @@ -2769,14 +2771,14 @@ struct gaim_connection *gc = sess->aux_data; struct oscar_data *odata = (struct oscar_data *)gc->proto_data; struct aim_ssi_item *curitem; - GSList *mem; int tmp; char **sns; debug_printf("ssi: syncing local list and server list\n"); - /* Delete the buddy list */ if (odata->icq) { + /* Delete the buddy list */ + debug_printf("ssi: using ICQ, removing ssi data\n"); aim_ssi_deletelist(sess, fr->conn); return 1; } @@ -2853,68 +2855,67 @@ /* Add from local list to server list */ if (gc) { + GSList *cur; + /* Buddies */ - GSList *curgrp = gc->groups; - while (curgrp) { - tmp = 0; - for (mem=((struct group*)curgrp->data)->members; mem; mem=mem->next) - if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)mem->data)->name, 0x0000)) - tmp++; - sns = (char **)malloc(tmp*sizeof(char*)); + cur = gc->groups; + while (cur) { + GSList *curbud; tmp = 0; - for (mem=((struct group*)curgrp->data)->members; mem; mem=mem->next) - if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)mem->data)->name, 0x0000)) { - debug_printf("ssi: adding buddy %s from local list to server list\n", ((struct buddy*)mem->data)->name); - sns[tmp] = ((char *)((struct buddy*)mem->data)->name); + for (curbud=((struct group*)cur->data)->members; curbud; curbud=curbud->next) + if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)curbud->data)->name, 0x0000)) tmp++; - } if (tmp) { - aim_ssi_addbuddies(sess, fr->conn, ((struct group*)curgrp)->name, sns, tmp); + sns = (char **)malloc(tmp*sizeof(char*)); + tmp = 0; + for (curbud=((struct group*)cur->data)->members; curbud; curbud=curbud->next) + if (!aim_ssi_inlist(sess, fr->conn, ((struct buddy*)curbud->data)->name, 0x0000)) { + debug_printf("ssi: adding buddy %s from local list to server list\n", ((struct buddy*)curbud->data)->name); + sns[tmp] = ((char *)((struct buddy*)curbud->data)->name); + tmp++; + } + aim_ssi_addbuddies(sess, fr->conn, ((struct group*)cur->data)->name, sns, tmp); free(sns); } - curgrp = g_slist_next(curgrp); + cur = g_slist_next(cur); } /* Permit list */ if (gc->permit) { - GSList *list; - tmp = 0; - for (list=gc->permit; list; list=list->next) - if (!aim_ssi_inlist(sess, fr->conn, list->data, 0x0002)) { - tmp++; - } - sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; - for (list=gc->permit; list; list=list->next) - if (!aim_ssi_inlist(sess, fr->conn, list->data, 0x0002)) { - debug_printf("ssi: adding permit %s from local list to server list\n", list->data); - sns[tmp] = list->data; + for (cur=gc->permit; cur; cur=cur->next) + if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0002)) tmp++; - } if (tmp) { - aim_ssi_addpermits(sess, fr->conn, sns, tmp); + sns = (char **)malloc(tmp*sizeof(char*)); + tmp = 0; + for (cur=gc->permit; cur; cur=cur->next) + if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0002)) { + debug_printf("ssi: adding permit %s from local list to server list\n", cur->data); + sns[tmp] = cur->data; + tmp++; + } + aim_ssi_addpord(sess, fr->conn, sns, tmp, AIM_SSI_TYPE_PERMIT); free(sns); } } /* Deny list */ if (gc->deny) { - GSList *list; - tmp = 0; - for (list=gc->deny; list; list=list->next) - if (!aim_ssi_inlist(sess, fr->conn, list->data, 0x0003)) { - tmp++; - } - sns = (char **)malloc(tmp*sizeof(char*)); tmp = 0; - for (list=gc->deny; list; list=list->next) - if (!aim_ssi_inlist(sess, fr->conn, list->data, 0x0003)) { - debug_printf("ssi: adding deny %s from local list to server list\n", list->data); - sns[tmp] = list->data; + for (cur=gc->deny; cur; cur=cur->next) + if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0003)) tmp++; - } if (tmp) { - aim_ssi_adddenies(sess, fr->conn, sns, tmp); + sns = (char **)malloc(tmp*sizeof(char*)); + tmp = 0; + for (cur=gc->deny; cur; cur=cur->next) + if (!aim_ssi_inlist(sess, fr->conn, cur->data, 0x0003)) { + debug_printf("ssi: adding deny %s from local list to server list\n", cur->data); + sns[tmp] = cur->data; + tmp++; + } + aim_ssi_addpord(sess, fr->conn, sns, tmp, AIM_SSI_TYPE_DENY); free(sns); } } @@ -3383,7 +3384,7 @@ } else { debug_printf("ssi: About to add a permit\n"); if (od->sess->ssi.received_data) - aim_ssi_addpermits(od->sess, od->conn, &who, 1); + aim_ssi_addpord(od->sess, od->conn, &who, 1, AIM_SSI_TYPE_PERMIT); } } @@ -3395,7 +3396,7 @@ } else { debug_printf("ssi: About to add a deny\n"); if (od->sess->ssi.received_data) - aim_ssi_adddenies(od->sess, od->conn, &who, 1); + aim_ssi_addpord(od->sess, od->conn, &who, 1, AIM_SSI_TYPE_DENY); } } @@ -3407,7 +3408,7 @@ } else { debug_printf("ssi: About to delete a permit\n"); if (od->sess->ssi.received_data) - aim_ssi_delpermits(od->sess, od->conn, &who, 1); + aim_ssi_delpord(od->sess, od->conn, &who, 1, AIM_SSI_TYPE_PERMIT); } } @@ -3419,7 +3420,7 @@ } else { debug_printf("ssi: About to delete a deny\n"); if (od->sess->ssi.received_data) - aim_ssi_deldenies(od->sess, od->conn, &who, 1); + aim_ssi_delpord(od->sess, od->conn, &who, 1, AIM_SSI_TYPE_DENY); } } Index: ssi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ssi.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ssi.c 4 Mar 2002 03:04:49 -0000 1.4 +++ ssi.c 7 Mar 2002 02:19:38 -0000 1.5 @@ -10,7 +10,6 @@ * * XXX - Make sure moving buddies from group to group moves the buddy in the server list also * XXX - Test for memory leaks - * XXX - Write a c plugin to manage ssi data * XXX - Better parsing of rights, and use the rights info to limit adds * */ @@ -24,6 +23,8 @@ faim_export int aim_ssi_inlist(aim_session_t *sess, aim_conn_t *conn, char *name, fu16_t type) { struct aim_ssi_item *cur; + if (!sess && !conn && !name) + return -EINVAL; for (cur=sess->ssi.items; cur; cur=cur->next) if ((cur->type==type) && (cur->name) && (!aim_sncmp(cur->name, name))) return 1; @@ -31,9 +32,28 @@ } /* + * Return the parent group of a given buddy. + */ +faim_export char *aim_ssi_getparentgroup(aim_session_t *sess, aim_conn_t *conn, char *name) +{ + fu16_t gid; + struct aim_ssi_item *cur; + if (!sess && !conn && !name) + return NULL; + for (cur=sess->ssi.items; cur && (cur->type!=AIM_SSI_TYPE_BUDDY || !cur->name || aim_sncmp(cur->name, name)); cur=cur->next) + if (!cur) + return NULL; + gid = cur->gid; + for (cur=sess->ssi.items; cur; cur=cur->next) + if ((cur->type == AIM_SSI_TYPE_GROUP) && (cur->gid == gid) && (cur->name)) + return cur->name; + return 0; +} + +/* * Returns the permit/deny byte - * Should should be removed and the byte should be passed directly to - * the handler + * This should be removed and the byte should be passed directly to + * the handler for x0006, along with all the buddies and other info. */ faim_export int aim_ssi_getpermdeny(aim_tlvlist_t *tlvlist) { @@ -53,7 +73,7 @@ for (cur=items; cur; cur=cur->next) if ((cur->type == type) && (cur->name) && !(aim_sncmp(cur->name, name))) return cur; - } else { /* they probably want the master group */ + } else { /* return the master group */ for (cur=items; cur; cur=cur->next) if ((cur->type == type) && (cur->gid == 0x0000)) return cur; @@ -129,11 +149,11 @@ newlen = 0; if (parentgroup->gid == 0x0000) { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid != 0x0000) && (cur->type == 0x0001)) + if ((cur->gid != 0x0000) && (cur->type == AIM_SSI_TYPE_GROUP)) newlen += 2; } else { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid == parentgroup->gid) && (cur->type == 0x0000)) + if ((cur->gid == parentgroup->gid) && (cur->type == AIM_SSI_TYPE_BUDDY)) newlen += 2; } @@ -148,11 +168,11 @@ aimbs_put16(&tbs, tbs.len-4); if (parentgroup->gid == 0x0000) { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid != 0x0000) && (cur->type == 0x0001)) + if ((cur->gid != 0x0000) && (cur->type == AIM_SSI_TYPE_GROUP)) aimbs_put16(&tbs, cur->gid); } else { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid == parentgroup->gid) && (cur->type == 0x0000)) + if ((cur->gid == parentgroup->gid) && (cur->type == AIM_SSI_TYPE_BUDDY)) aimbs_put16(&tbs, cur->bid); } tbs.offset = 0; @@ -166,14 +186,14 @@ newlen = 0; if (parentgroup->gid == 0x0000) { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid != 0x0000) && (cur->type == 0x0001)) { + if ((cur->gid != 0x0000) && (cur->type == AIM_SSI_TYPE_GROUP)) { memcpy(&newdata[newlen*2], &cur->gid, 2); newlen += 2; } } else { for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->gid == parentgroup->gid) && (cur->type == 0x0000)) { - memcpy(newdata+newlen*2, &cur->bid, 2); + if ((cur->gid == parentgroup->gid) && (cur->type == AIM_SSI_TYPE_BUDDY)) { + memcpy(&newdata[newlen*2], &cur->bid, 2); newlen += 2; } } @@ -220,13 +240,13 @@ if (!(items = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)))) return -ENOMEM; - bzero(items, num*sizeof(struct aim_ssi_item *)); + memset(items, 0, num*sizeof(struct aim_ssi_item *)); for (cur=sess->ssi.items, num=0; cur; cur=cur->next) { items[num] = cur; num++; } - aim_ssi_delitems(sess, conn, items, num); + aim_ssi_addmoddel(sess, conn, items, num, AIM_CB_SSI_DEL); free(items); aim_ssi_dispatch(sess, conn); aim_ssi_freelist(sess); @@ -248,7 +268,7 @@ /* Make sure we actually need to clean out the list */ for (cur=sess->ssi.items, num_to_be_fixed=0; cur; cur=cur->next) { /* Any buddies directly in the master group */ - if ((cur->type == 0x0000) && (cur->gid == 0x0000)) + if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000)) num_to_be_fixed++; } if (!num_to_be_fixed) @@ -256,16 +276,16 @@ /* Remove all the additional data from all groups and buddies */ for (cur=sess->ssi.items; cur; cur=cur->next) - if (cur->data && ((cur->type == 0x0000) || (cur->type == 0x0001))) { + if (cur->data && ((cur->type == AIM_SSI_TYPE_BUDDY) || (cur->type == AIM_SSI_TYPE_GROUP))) { aim_freetlvchain((aim_tlvlist_t **)&cur->data); cur->data = NULL; } /* If there are buddies directly in the master group, make sure */ /* there is a group to put them in. Any group, any group at all. */ - for (cur=sess->ssi.items; ((cur) && ((cur->type != 0x0000) || (cur->gid != 0x0000))); cur=cur->next); + for (cur=sess->ssi.items; ((cur) && ((cur->type != AIM_SSI_TYPE_BUDDY) || (cur->gid != 0x0000))); cur=cur->next); if (!cur) { - for (parentgroup=sess->ssi.items; ((parentgroup) && ((parentgroup->type!=0x0001) || (parentgroup->gid!=0x0000))); parentgroup=parentgroup->next); + for (parentgroup=sess->ssi.items; ((parentgroup) && ((parentgroup->type!=AIM_SSI_TYPE_GROUP) || (parentgroup->gid!=0x0000))); parentgroup=parentgroup->next); if (!parentgroup) { char *newgroup; newgroup = (char*)malloc(strlen("Unknown")*sizeof(char)); @@ -275,61 +295,25 @@ } /* Set parentgroup equal to any arbitray group */ - for (parentgroup=sess->ssi.items; parentgroup->gid==0x0000 || parentgroup->type!=0x0001; parentgroup=parentgroup->next); + for (parentgroup=sess->ssi.items; parentgroup->gid==0x0000 || parentgroup->type!=AIM_SSI_TYPE_GROUP; parentgroup=parentgroup->next); /* If there are any buddies directly in the master group, put them in a real group */ for (cur=sess->ssi.items; cur; cur=cur->next) - if ((cur->type == 0x0000) && (cur->gid == 0x0000)) { - aim_ssi_delitems(sess, conn, &cur, 1); + if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000)) { + aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_DEL); cur->gid = parentgroup->gid; - aim_ssi_additems(sess, conn, &cur, 1); + aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD); } /* Rebuild additional data for all groups */ for (parentgroup=sess->ssi.items; parentgroup; parentgroup=parentgroup->next) - if (parentgroup->type == 0x0001) + if (parentgroup->type == AIM_SSI_TYPE_GROUP) aim_ssi_rebuildgroup(sess, conn, parentgroup); /* Send a mod snac for all groups */ for (cur=sess->ssi.items; cur; cur=cur->next) - if (cur->type == 0x0001) - aim_ssi_moditems(sess, conn, &cur, 1); - - /* Begin sending SSI SNACs */ - aim_ssi_dispatch(sess, conn); - - return 0; -} - -/* - * This adds the master group (the group containing all groups) if it doesn't exist. - * It's called by aim_ssi_addgroups, if your list is empty. - */ -faim_export int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn) { - struct aim_ssi_item *newitem; - - if (!sess || !conn) - return -EINVAL; - - /* Allocate an array of pointers to each of the new items */ - if (!(newitem = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) - return -ENOMEM; - bzero(newitem, sizeof(struct aim_ssi_item)); - - /* bzero sets most of the vars to what they should be */ - newitem->type = 0x0001; - - /* Add the item to our list */ - newitem->next = sess->ssi.items; - sess->ssi.items = newitem; - - /* If there are any existing groups (technically there shouldn't be, but */ - /* just in case) then add their group ID#'s to the additional data */ - if (sess->ssi.items) - aim_ssi_rebuildgroup(sess, conn, newitem); - - /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, &newitem, 1); + if (cur->type == AIM_SSI_TYPE_GROUP) + aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_MOD); /* Begin sending SSI SNACs */ aim_ssi_dispatch(sess, conn); @@ -355,16 +339,16 @@ return -EINVAL; /* Look up the parent group */ - if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, 0x0001))) { + if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, AIM_SSI_TYPE_GROUP))) { aim_ssi_addgroups(sess, conn, &gn, 1); - if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, 0x0001))) + if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, AIM_SSI_TYPE_GROUP))) return -ENOMEM; } /* Allocate an array of pointers to each of the new items */ if (!(newitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)))) return -ENOMEM; - bzero(newitems, num*sizeof(struct aim_ssi_item *)); + memset(newitems, 0, num*sizeof(struct aim_ssi_item *)); /* The following for loop iterates once per item that needs to be added. */ /* For each i, create an item and tack it onto the newitems array */ @@ -392,10 +376,10 @@ do { newitems[i]->bid += 0x0001; for (cur=sess->ssi.items, j=0; ((cur) && (!j)); cur=cur->next) - if ((cur->bid == newitems[i]->bid) && (cur->gid == newitems[i]->gid) && (cur->type == 0x0000)) + if ((cur->bid == newitems[i]->bid) && (cur->gid == newitems[i]->gid) && (cur->type == AIM_SSI_TYPE_BUDDY)) j=1; } while (j); - newitems[i]->type = 0x0000; + newitems[i]->type = AIM_SSI_TYPE_BUDDY; newitems[i]->data = NULL; newitems[i]->next = i ? newitems[i-1] : NULL; } @@ -405,7 +389,7 @@ sess->ssi.items = newitems[num-1]; /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, newitems, num); + aim_ssi_addmoddel(sess, conn, newitems, num, AIM_CB_SSI_ADD); /* Free the array of pointers to each of the new items */ free(newitems); @@ -414,7 +398,43 @@ aim_ssi_rebuildgroup(sess, conn, parentgroup); /* Send the mod item SNAC */ - aim_ssi_moditems(sess, conn, &parentgroup, 1); + aim_ssi_addmoddel(sess, conn, &parentgroup, 1, AIM_CB_SSI_MOD); + + /* Begin sending SSI SNACs */ + aim_ssi_dispatch(sess, conn); + + return 0; +} + +/* + * This adds the master group (the group containing all groups) if it doesn't exist. + * It's called by aim_ssi_addgroups, if your list is empty. + */ +faim_export int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn) { + struct aim_ssi_item *newitem; + + if (!sess || !conn) + return -EINVAL; + + /* Allocate an array of pointers to each of the new items */ + if (!(newitem = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) + return -ENOMEM; + memset(newitem, 0, sizeof(struct aim_ssi_item)); + + /* memset to 0 sets most of the vars to what they should be */ + newitem->type = AIM_SSI_TYPE_GROUP; + + /* Add the item to our list */ + newitem->next = sess->ssi.items; + sess->ssi.items = newitem; + + /* If there are any existing groups (technically there shouldn't be, but */ + /* just in case) then add their group ID#'s to the additional data */ + if (sess->ssi.items) + aim_ssi_rebuildgroup(sess, conn, newitem); + + /* Send the add item SNAC */ + aim_ssi_addmoddel(sess, conn, &newitem, 1, AIM_CB_SSI_ADD); /* Begin sending SSI SNACs */ aim_ssi_dispatch(sess, conn); @@ -431,16 +451,16 @@ return -EINVAL; /* Look up the parent group */ - if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, 0x0001))) { + if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, AIM_SSI_TYPE_GROUP))) { aim_ssi_addmastergroup(sess, conn); - if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, 0x0001))) + if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, AIM_SSI_TYPE_GROUP))) return -ENOMEM; } /* Allocate an array of pointers to each of the new items */ if (!(newitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)))) return -ENOMEM; - bzero(newitems, num*sizeof(struct aim_ssi_item *)); + memset(newitems, 0, num*sizeof(struct aim_ssi_item *)); /* The following for loop iterates once per item that needs to be added. */ /* For each i, create an item and tack it onto the newitems array */ @@ -467,11 +487,11 @@ do { newitems[i]->gid += 0x0001; for (cur=sess->ssi.items, j=0; ((cur) && (!j)); cur=cur->next) - if ((cur->gid == newitems[i]->gid) && (cur->type == 0x0001)) + if ((cur->gid == newitems[i]->gid) && (cur->type == AIM_SSI_TYPE_GROUP)) j=1; } while (j); newitems[i]->bid = 0x0000; - newitems[i]->type = 0x0001; + newitems[i]->type = AIM_SSI_TYPE_GROUP; newitems[i]->data = NULL; newitems[i]->next = i ? newitems[i-1] : NULL; } @@ -481,7 +501,7 @@ sess->ssi.items = newitems[num-1]; /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, newitems, num); + aim_ssi_addmoddel(sess, conn, newitems, num, AIM_CB_SSI_ADD); /* Free the array of pointers to each of the new items */ free(newitems); @@ -490,70 +510,7 @@ aim_ssi_rebuildgroup(sess, conn, parentgroup); /* Send the mod item SNAC */ - aim_ssi_moditems(sess, conn, &parentgroup, 1); - - /* Begin sending SSI SNACs */ - aim_ssi_dispatch(sess, conn); - - return 0; -} - -faim_export int aim_ssi_addpermits(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num) -{ - struct aim_ssi_item *cur, **newitems; - fu16_t i, j; - - if (!sess || !conn || !sn || !num) - return -EINVAL; - - /* Allocate an array of pointers to each of the new items */ - if (!(newitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)))) - return -ENOMEM; - bzero(newitems, num*sizeof(struct aim_ssi_item *)); - - /* The following for loop iterates once per item that needs to be added. */ - /* For each i, create an item and tack it onto the newitems array */ - for (i=0; i<num; i++) { - if (!(newitems[i] = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) { - for (j=0; j<(i-1); j++) { - free(newitems[j]->name); - free(newitems[j]); - } - free(newitems); - return -ENOMEM; - } - if (!(newitems[i]->name = (char *)malloc((strlen(sn[i])+1)*sizeof(char)))) { - for (j=0; j<(i-1); j++) { - free(newitems[j]->name); - free(newitems[j]); - } - free(newitems[i]); - free(newitems); - return -ENOMEM; - } - strcpy(newitems[i]->name, sn[i]); - newitems[i]->gid = 0x0000; - newitems[i]->bid = i ? newitems[i-1]->bid : 0x0000; - do { - newitems[i]->bid += 0x0001; - for (cur=sess->ssi.items, j=0; ((cur) && (!j)); cur=cur->next) - if ((cur->bid == newitems[i]->bid) && ((cur->type == 0x0002) || (cur->type == 0x0003))) - j=1; - } while (j); - newitems[i]->type = 0x0002; - newitems[i]->data = NULL; - newitems[i]->next = i ? newitems[i-1] : NULL; - } - - /* Add the items to our list */ - newitems[0]->next = sess->ssi.items; - sess->ssi.items = newitems[num-1]; - - /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, newitems, num); - - /* Free the array of pointers to each of the new items */ - free(newitems); + aim_ssi_addmoddel(sess, conn, &parentgroup, 1, AIM_CB_SSI_MOD); /* Begin sending SSI SNACs */ aim_ssi_dispatch(sess, conn); @@ -561,18 +518,22 @@ return 0; } -faim_export int aim_ssi_adddenies(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num) +/* + * Add permit or deny buddies to the permit or deny list. + * The buddies are passed as an array of pointers to char strings. + */ +faim_export int aim_ssi_addpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type) { struct aim_ssi_item *cur, **newitems; fu16_t i, j; - if (!sess || !conn || !sn || !num) + if (!sess || !conn || !sn || !num || (type!=AIM_SSI_TYPE_PERMIT && type!=AIM_SSI_TYPE_DENY)) return -EINVAL; /* Allocate an array of pointers to each of the new items */ if (!(newitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)))) return -ENOMEM; - bzero(newitems, num*sizeof(struct aim_ssi_item *)); + memset(newitems, 0, num*sizeof(struct aim_ssi_item *)); /* The following for loop iterates once per item that needs to be added. */ /* For each i, create an item and tack it onto the newitems array */ @@ -600,10 +561,10 @@ do { newitems[i]->bid += 0x0001; for (cur=sess->ssi.items, j=0; ((cur) && (!j)); cur=cur->next) - if ((cur->bid == newitems[i]->bid) && ((cur->type == 0x0002) || (cur->type == 0x0003))) + if ((cur->bid == newitems[i]->bid) && ((cur->type == AIM_SSI_TYPE_PERMIT) || (cur->type == AIM_SSI_TYPE_DENY))) j=1; } while (j); - newitems[i]->type = 0x0003; + newitems[i]->type = type; newitems[i]->data = NULL; newitems[i]->next = i ? newitems[i-1] : NULL; } @@ -613,7 +574,7 @@ sess->ssi.items = newitems[num-1]; /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, newitems, num); + aim_ssi_addmoddel(sess, conn, newitems, num, AIM_CB_SSI_ADD); /* Free the array of pointers to each of the new items */ free(newitems); @@ -633,16 +594,16 @@ return -EINVAL; /* Look up the parent group */ - if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, 0x0001))) + if (!(parentgroup = get_ssi_item(sess->ssi.items, gn, AIM_SSI_TYPE_GROUP))) return -EINVAL; /* Allocate an array of pointers to each of the items to be deleted */ delitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)); - bzero(delitems, num*sizeof(struct aim_ssi_item *)); + memset(delitems, 0, num*sizeof(struct aim_ssi_item *)); /* Make the delitems array a pointer to the aim_ssi_item structs to be deleted */ for (i=0; i<num; i++) { - if (!(delitems[i] = get_ssi_item(sess->ssi.items, sn[i], 0x0000))) { + if (!(delitems[i] = get_ssi_item(sess->ssi.items, sn[i], AIM_SSI_TYPE_BUDDY))) { free(delitems); return -EINVAL; } @@ -658,7 +619,7 @@ } /* Send the del item SNAC */ - aim_ssi_delitems(sess, conn, delitems, num); + aim_ssi_addmoddel(sess, conn, delitems, num, AIM_CB_SSI_DEL); /* Free the items */ for (i=0; i<num; i++) { @@ -674,7 +635,7 @@ aim_ssi_rebuildgroup(sess, conn, parentgroup); /* Send the mod item SNAC */ - aim_ssi_moditems(sess, conn, &parentgroup, 1); + aim_ssi_addmoddel(sess, conn, &parentgroup, 1, AIM_CB_SSI_MOD); /* Delete the group, but only if it's empty */ if (!parentgroup->data) @@ -686,60 +647,34 @@ return 0; } -faim_export int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num) { - struct aim_ssi_item *cur, *parentgroup, **delitems; - int i; +faim_export int aim_ssi_delmastergroup(aim_session_t *sess, aim_conn_t *conn) { + struct aim_ssi_item *cur, *delitem; - if (!sess || !conn || !gn || !num) + if (!sess || !conn) return -EINVAL; - /* Look up the parent group */ - if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, 0x0001))) + /* Make delitem a pointer to the aim_ssi_item to be deleted */ + if (!(delitem = get_ssi_item(sess->ssi.items, NULL, AIM_SSI_TYPE_GROUP))) return -EINVAL; - /* Allocate an array of pointers to each of the items to be deleted */ - delitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)); - bzero(delitems, num*sizeof(struct aim_ssi_item *)); - - /* Make the delitems array a pointer to the aim_ssi_item structs to be deleted */ - for (i=0; i<num; i++) { - if (!(delitems[i] = get_ssi_item(sess->ssi.items, gn[i], 0x0001))) { - free(delitems); - return -EINVAL; - } - - /* Remove the delitems from the item list */ - if (sess->ssi.items == delitems[i]) { - sess->ssi.items = sess->ssi.items->next; - } else { - for (cur=sess->ssi.items; (cur->next && (cur->next!=delitems[i])); cur=cur->next); - if (cur->next) - cur->next = cur->next->next; - } + /* Remove delitem from the item list */ + if (sess->ssi.items == delitem) { + sess->ssi.items = sess->ssi.items->next; + } else { + for (cur=sess->ssi.items; (cur->next && (cur->next!=delitem)); cur=cur->next); + if (cur->next) + cur->next = cur->next->next; } /* Send the del item SNAC */ - aim_ssi_delitems(sess, conn, delitems, num); - - /* Free the items */ - for (i=0; i<num; i++) { - if (delitems[i]->name) - free(delitems[i]->name); - if (delitems[i]->data) - aim_freetlvchain((aim_tlvlist_t **)&delitems[i]->data); - free(delitems[i]); - } - free(delitems); - - /* Rebuild the additional data in the parent group */ - aim_ssi_rebuildgroup(sess, conn, parentgroup); - - /* Send the mod item SNAC */ - aim_ssi_moditems(sess, conn, &parentgroup, 1); + aim_ssi_addmoddel(sess, conn, &delitem, 1, AIM_CB_SSI_DEL); - /* Delete the group, but only if it's empty */ - if (!parentgroup->data) - aim_ssi_delgroups(sess, conn, &parentgroup->name, 1); + /* Free the item */ + if (delitem->name) + free(delitem->name); + if (delitem->data) + aim_freetlvchain((aim_tlvlist_t **)&delitem->data); + free(delitem); /* Begin sending SSI SNACs */ aim_ssi_dispatch(sess, conn); @@ -747,20 +682,24 @@ return 0; } -faim_export int aim_ssi_delpermits(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num) { - struct aim_ssi_item *cur, **delitems; +faim_export int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num) { + struct aim_ssi_item *cur, *parentgroup, **delitems; int i; - if (!sess || !conn || !sn || !num) + if (!sess || !conn || !gn || !num) + return -EINVAL; + + /* Look up the parent group */ + if (!(parentgroup = get_ssi_item(sess->ssi.items, NULL, AIM_SSI_TYPE_GROUP))) return -EINVAL; /* Allocate an array of pointers to each of the items to be deleted */ delitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)); - bzero(delitems, num*sizeof(struct aim_ssi_item *)); + memset(delitems, 0, num*sizeof(struct aim_ssi_item *)); /* Make the delitems array a pointer to the aim_ssi_item structs to be deleted */ for (i=0; i<num; i++) { - if (!(delitems[i] = get_ssi_item(sess->ssi.items, sn[i], 0x0002))) { + if (!(delitems[i] = get_ssi_item(sess->ssi.items, gn[i], AIM_SSI_TYPE_GROUP))) { free(delitems); return -EINVAL; } @@ -776,7 +715,7 @@ } /* Send the del item SNAC */ - aim_ssi_delitems(sess, conn, delitems, num); + aim_ssi_addmoddel(sess, conn, delitems, num, AIM_CB_SSI_DEL); /* Free the items */ for (i=0; i<num; i++) { @@ -788,26 +727,36 @@ } free(delitems); + /* Rebuild the additional data in the parent group */ + aim_ssi_rebuildgroup(sess, conn, parentgroup); + + /* Send the mod item SNAC */ + aim_ssi_addmoddel(sess, conn, &parentgroup, 1, AIM_CB_SSI_MOD); + + /* Delete the group, but only if it's empty */ + if (!parentgroup->data) + aim_ssi_delmastergroup(sess, conn); + /* Begin sending SSI SNACs */ aim_ssi_dispatch(sess, conn); return 0; } -faim_export int aim_ssi_deldenies(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num) { +faim_export int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, fu16_t type) { struct aim_ssi_item *cur, **delitems; int i; - if (!sess || !conn || !sn || !num) + if (!sess || !conn || !sn || !num || (type!=AIM_SSI_TYPE_PERMIT && type!=AIM_SSI_TYPE_DENY)) return -EINVAL; /* Allocate an array of pointers to each of the items to be deleted */ delitems = (struct aim_ssi_item **)malloc(num*sizeof(struct aim_ssi_item *)); - bzero(delitems, num*sizeof(struct aim_ssi_item *)); + memset(delitems, 0, num*sizeof(struct aim_ssi_item *)); /* Make the delitems array a pointer to the aim_ssi_item structs to be deleted */ for (i=0; i<num; i++) { - if (!(delitems[i] = get_ssi_item(sess->ssi.items, sn[i], 0x0003))) { + if (!(delitems[i] = get_ssi_item(sess->ssi.items, sn[i], type))) { free(delitems); return -EINVAL; } @@ -823,7 +772,7 @@ } /* Send the del item SNAC */ - aim_ssi_delitems(sess, conn, delitems, num); + aim_ssi_addmoddel(sess, conn, delitems, num, AIM_CB_SSI_DEL); /* Free the items */ for (i=0; i<num; i++) { @@ -860,7 +809,7 @@ return -EINVAL; /* Look up the permit/deny settings item */ - for (cur=sess->ssi.items; (cur && (cur->type!=0x0004)); cur=cur->next); + for (cur=sess->ssi.items; (cur && (cur->type!=AIM_SSI_TYPE_PDINFO)); cur=cur->next); if (cur) { /* The permit/deny item exists */ @@ -878,7 +827,7 @@ } /* Send the mod item SNAC */ - aim_ssi_moditems(sess, conn, &cur, 1); + aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_MOD); } else { /* Need to add the permit/deny item */ if (!(cur = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)))) @@ -892,7 +841,7 @@ if (tmp->bid == cur->bid) j=1; } while (j); - cur->type = 0x0004; + cur->type = AIM_SSI_TYPE_PDINFO; cur->data = NULL; aim_addtlvtochain8((aim_tlvlist_t**)&cur->data, 0x00ca, permdeny); aim_addtlvtochain32((aim_tlvlist_t**)&cur->data, 0x00cb, 0xffffffff); @@ -902,7 +851,7 @@ sess->ssi.items = cur; /* Send the add item SNAC */ - aim_ssi_additems(sess, conn, &cur, 1); + aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD); } /* Begin sending SSI SNACs */ @@ -916,7 +865,7 @@ */ faim_export int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn) { - return aim_genericreq_n(sess, conn, 0x0013, 0x0002); + return aim_genericreq_n(sess, conn, AIM_CB_FAM_SSI, AIM_CB_SSI_REQRIGHTS); } /* @@ -953,9 +902,9 @@ if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4+2))) return -ENOMEM; - snacid = aim_cachesnac(sess, 0x0013, 0x0005, 0x0000, NULL, 0); + snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, AIM_CB_SSI_REQLIST, 0x0000, NULL, 0); - aim_putsnac(&fr->data, 0x0013, 0x0005, 0x0000, snacid); + aim_putsnac(&fr->data, AIM_CB_FAM_SSI, AIM_CB_SSI_REQLIST, 0x0000, snacid); aimbs_put32(&fr->data, localstamp); aimbs_put16(&fr->data, localrev); @@ -1034,113 +983,18 @@ */ faim_export int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn) { - return aim_genericreq_n(sess, conn, 0x0013, 0x0007); -} - -/* - * SSI Add Item. - * - * Adds an item to the data stored on the AIM server. An item could - * be a group, buddy, or permit or deny buddy. - * - */ -faim_export int aim_ssi_additems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num) -{ - aim_frame_t *fr; - aim_snacid_t snacid; - int i, snaclen; - - if (!sess || !conn || !items || !num) - return -EINVAL; - - snaclen = 10; /* For family, subtype, flags, and SNAC ID */ - for (i=0; i<num; i++) { - snaclen += 10; /* For length, GID, BID, type, and length */ - if (items[i]->name) - snaclen += strlen(items[i]->name); - if (items[i]->data) - snaclen += aim_sizetlvchain((aim_tlvlist_t **)&items[i]->data); - } - - if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, snaclen))) - return -ENOMEM; - - snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, AIM_CB_SSI_ADD, 0x0000, NULL, 0); - aim_putsnac(&fr->data, AIM_CB_FAM_SSI, AIM_CB_SSI_ADD, 0x0000, snacid); - - for (i=0; i<num; i++) { - aimbs_put16(&fr->data, items[i]->name ? strlen(items[i]->name) : 0); - if (items[i]->name) - aimbs_putraw(&fr->data, items[i]->name, strlen(items[i]->name)); - aimbs_put16(&fr->data, items[i]->gid); - aimbs_put16(&fr->data, items[i]->bid); - aimbs_put16(&fr->data, items[i]->type); - aimbs_put16(&fr->data, items[i]->data ? aim_sizetlvchain((aim_tlvlist_t **)&items[i]->data) : 0); - if (items[i]->data) - aim_writetlvchain(&fr->data, (aim_tlvlist_t **)&items[i]->data); - } - - aim_ssi_enqueue(sess, conn, fr); - - return 0; -} - -/* - * SSI Mod Item. - * - * Modifies an item in the data stored on the AIM server. An item could - * be a group, buddy, or permit or deny buddy. - * - */ -faim_export int aim_ssi_moditems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num) -{ - aim_frame_t *fr; - aim_snacid_t snacid; - int i, snaclen; - - if (!sess || !conn || !items || !num) - return -EINVAL; - - snaclen = 10; /* For family, subtype, flags, and SNAC ID */ - for (i=0; i<num; i++) { - snaclen += 10; /* For length, GID, BID, type, and length */ - if (items[i]->name) - snaclen += strlen(items[i]->name); - if (items[i]->data) - snaclen += aim_sizetlvchain((aim_tlvlist_t **)&items[i]->data); - } - - if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, snaclen))) - return -ENOMEM; - - snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, AIM_CB_SSI_MOD, 0x0000, NULL, 0); - aim_putsnac(&fr->data, AIM_CB_FAM_SSI, AIM_CB_SSI_MOD, 0x0000, snacid); - - for (i=0; i<num; i++) { - aimbs_put16(&fr->data, items[i]->name ? strlen(items[i]->name) : 0); - if (items[i]->name) - aimbs_putraw(&fr->data, items[i]->name, strlen(items[i]->name)); - aimbs_put16(&fr->data, items[i]->gid); - aimbs_put16(&fr->data, items[i]->bid); - aimbs_put16(&fr->data, items[i]->type); - aimbs_put16(&fr->data, items[i]->data ? aim_sizetlvchain((aim_tlvlist_t **)&items[i]->data) : 0); - if (items[i]->data) - aim_writetlvchain(&fr->data, (aim_tlvlist_t **)&items[i]->data); - } - - aim_ssi_enqueue(sess, conn, fr); - - return 0; + return aim_genericreq_n(sess, conn, AIM_CB_FAM_SSI, 0x0007); } /* - * SSI Del Item. + * SSI Add/Mod/Del Item(s). * - * Deletes an item from the data stored on the AIM server. An item - * could be a group, buddy, or permit or deny buddy. + * Sends the SNAC to add, modify, or delete an item from the server-stored + * information. These 3 SNACs all have an identical structure. The only + * difference is the subtype that is set for the SNAC. * */ -faim_export int aim_ssi_delitems(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num) +faim_export int aim_ssi_addmoddel(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num, fu16_t subtype) { aim_frame_t *fr; aim_snacid_t snacid; @@ -1161,8 +1015,8 @@ if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, snaclen))) return -ENOMEM; - snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, AIM_CB_SSI_DEL, 0x0000, NULL, 0); - aim_putsnac(&fr->data, AIM_CB_FAM_SSI, AIM_CB_SSI_DEL, 0x0000, snacid); + snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, subtype, 0x0000, NULL, 0); + aim_putsnac(&fr->data, AIM_CB_FAM_SSI, subtype, 0x0000, snacid); for (i=0; i<num; i++) { aimbs_put16(&fr->data, items[i]->name ? strlen(items[i]->name) : 0); @@ -1184,7 +1038,7 @@ /* * SSI Add/Mod/Del Ack. * - * Response to aim_ssi_additem(), aim_ssi_moditem(), or aim_ssi_delitem(). + * Response to add, modify, or delete SNAC (sent with aim_ssi_addmoddel). * */ static int parseack(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) @@ -1209,7 +1063,7 @@ */ faim_export int aim_ssi_modbegin(aim_session_t *sess, aim_conn_t *conn) { - return aim_genericreq_n(sess, conn, 0x0013, 0x0011); + return aim_genericreq_n(sess, conn, AIM_CB_FAM_SSI, AIM_CB_SSI_EDITSTART); } /* @@ -1220,7 +1074,7 @@ */ faim_export int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn) { - return aim_genericreq_n(sess, conn, 0x0013, 0x0012); + return aim_genericreq_n(sess, conn, AIM_CB_FAM_SSI, AIM_CB_SSI_EDITSTOP); } /* @@ -1246,13 +1100,13 @@ static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { - if (snac->subtype == 0x0003) + if (snac->subtype == AIM_CB_SSI_RIGHTSINFO) return parserights(sess, mod, rx, snac, bs); - else if (snac->subtype == 0x006) + else if (snac->subtype == AIM_CB_SSI_LIST) return parsedata(sess, mod, rx, snac, bs); else if (snac->subtype == AIM_CB_SSI_SRVACK) return parseack(sess, mod, rx, snac, bs); - else if (snac->subtype == 0x00f) + else if (snac->subtype == AIM_CB_SSI_NOLIST) return parsedataunchanged(sess, mod, rx, snac, bs); return 0; @@ -1268,7 +1122,7 @@ faim_internal int ssi_modfirst(aim_session_t *sess, aim_module_t *mod) { - mod->family = 0x0013; + mod->family = AIM_CB_FAM_SSI; mod->version = 0x0001; mod->toolid = 0x0110; mod->toolversion = 0x047b; |
From: Rob F. <rob...@us...> - 2002-03-07 00:46:13
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv19836/oscar Modified Files: oscar.c Log Message: Is this retarded? Someone tell me. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- oscar.c 6 Mar 2002 05:26:58 -0000 1.109 +++ oscar.c 7 Mar 2002 00:46:10 -0000 1.110 @@ -2412,7 +2412,7 @@ } static char *oscar_name() { - return "Oscar"; + return "Oscar / ICQ"; } static int oscar_send_typing(struct gaim_connection *gc, char *name, int typing) { |
From: Rob F. <rob...@us...> - 2002-03-07 00:46:13
|
Update of /cvsroot/gaim/gaim/src/protocols In directory usw-pr-cvs1:/tmp/cvs-serv19836 Modified Files: Makefile.am Log Message: Is this retarded? Someone tell me. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 3 Oct 2001 06:04:44 -0000 1.3 +++ Makefile.am 7 Mar 2002 00:46:09 -0000 1.4 @@ -1,4 +1,4 @@ -DIST_SUBDIRS = gg icq irc jabber msn napster oscar toc yahoo zephyr +DIST_SUBDIRS = gg irc jabber msn napster oscar toc yahoo zephyr if PRPLS |
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv15429 Modified Files: gnomeicu-away.xpm gnomeicu-dnd.xpm gnomeicu-ffc.xpm gnomeicu-na.xpm gnomeicu-occ.xpm gnomeicu-offline.xpm gnomeicu-online.xpm Log Message: Well, this IS more standard I guess.... Index: gnomeicu-away.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-away.xpm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gnomeicu-away.xpm 23 Feb 2002 23:24:32 -0000 1.4 +++ gnomeicu-away.xpm 7 Mar 2002 00:29:59 -0000 1.5 @@ -1,28 +1,22 @@ /* XPM */ static char * icon_away_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 6 1", -" c black", -". c #00fc00", -"X c #808080", -"o c #c0c0c0", -"O c #f8fcf8", -"+ c None", -/* pixels */ -"+++++ O +++++++", -"++++ O O ++", -"++ . o . +", -"+ O O.. oO . +", -"+ O. O. oOO ++", -"++ . oOOOo ++", -" XOOOOOO ++", -" O oOOOOOOOOo +", -"+ oOOOOOOOOOOO +", -"+ OOOOOOOOOOOo ", -" oOOOOOOOOo +", -" O. OOOOOOo +++", -" OO oOOOo .. ++", -"+ + OOo O.. ++", -"++++ o + O ++", -"++++ ++++ +++" -}; +"12 12 7 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #00FC00", +"# c #C0C0C0", +"$ c #F8FCF8", +"% c #2C2C2C", +" .. .. ", +" .+@..#. ", +" .@@.#$%.. ", +" ....$$$#.@.", +"...#$$$$$#..", +".#$$$$$$$$. ", +" .$$$$$$$$#.", +"..#$$$$$#...", +".@.$$$$#... ", +" ...$$#.@. ", +" .#..@@. ", +" .. .. "}; Index: gnomeicu-dnd.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-dnd.xpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomeicu-dnd.xpm 23 Feb 2002 23:24:32 -0000 1.3 +++ gnomeicu-dnd.xpm 7 Mar 2002 00:29:59 -0000 1.4 @@ -1,28 +1,21 @@ /* XPM */ static char * icon_dnd_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 6 1", -" c black", -". c #00fc00", -"X c #800000", -"o c #f80000", -"O c #f8fcf8", -"+ c None", -/* pixels */ -"+++++++ +++++++", -"++++++ O. + ++", -"++ + O.. O. +", -"+ O O.. O.. +", -"+ O. XX.XXO.. ++", -"++ OXooXooX. +++", -" XoOoooOoX +++", -" O.XooOoOooX ++", -"+ O.XooOooX... +", -"+ XooOoOooX.. ", -" OXoOoooOoX +", -" O..XooXooX +++", -" OO XX.XX... ++", -"+ + O. O.. ++", -"++++ O + O ++", -"++++ ++++ +++" -}; +"12 12 6 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #00FC00", +"# c #F80000", +"$ c #F9C0C0", +" .. .. ", +" .+@.+@. ", +" .##.@##.. ", +" .#+####+#@.", +".+##+##+##@.", +".@@##$$##.. ", +" ..##$$##@@.", +".+##+##+##@.", +".@#+####+#. ", +" ..##@.##. ", +" .@@.@@. ", +" .. .. "}; Index: gnomeicu-ffc.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-ffc.xpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomeicu-ffc.xpm 23 Feb 2002 23:24:32 -0000 1.3 +++ gnomeicu-ffc.xpm 7 Mar 2002 00:29:59 -0000 1.4 @@ -1,28 +1,21 @@ /* XPM */ static char * icon_ffc_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 6 1", -" c black", -". c navy", -"X c green", -"o c yellow", -"O c white", -"+ c None", -/* pixels */ -"+++++++ +++++++", -"++++++ OX + ++", -"++ + OXX OX +", -"+ OX XX OXX +", -"+ O X ++", -"++ Ooooooo +++", -" Oo..o..oo +++", -" O Ooooooooo ++", -"+ Oo.ooo.oo X +", -"+ Oo...oo XX ", -" OX Oooo +", -" OXX o XX +++", -" OO O OXXX ++", -"+ + OX OXX ++", -"++++ O + O ++", -"++++ ++++ +++" -}; +"12 12 6 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #00FC00", +"# c #FFFF00", +"$ c #000080", +" .. .. ", +" .+@.+@. ", +" ......... ", +" ..+#####.@.", +"..+#$$#$$#..", +"..+#######. ", +" .+#$###$#..", +".+.+#$$$#.@.", +".@@.+###... ", +" .....#.@. ", +" .@@.@@. ", +" .. .. "}; Index: gnomeicu-na.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-na.xpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomeicu-na.xpm 23 Feb 2002 23:24:32 -0000 1.3 +++ gnomeicu-na.xpm 7 Mar 2002 00:29:59 -0000 1.4 @@ -1,27 +1,21 @@ /* XPM */ static char * icon_na_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 5 1", -" c black", -". c #00fc00", -"X c #f80000", -"o c #f8fcf8", -"O c None", -/* pixels */ -"OOOOOOO OOOOOOO", -"OOOOOO o. O OO", -"OO O o.. o. O", -"O o o.. o.. O", -"OXXXXXXXXXXXXXXO", -"XXooooooooooooXX", -"Xo oo ooo o ooX", -"Xo o oo o oo oX", -"Xo o oo o oX", -"Xo oo o oo oo oX", -"Xo oo o oo oo oX", -"XXooooooooooooXX", -"OXXXXXXXXXXXXXXO", -"O O o. o.. OO", -"OOOO o O o OO", -"OOOO OOOO OOO" -}; +"12 12 6 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #00FC00", +"# c #F80000", +"$ c #F8FCF8", +" .. .. ", +" .+@.+@. ", +" .@@.@@... ", +" .########@.", +".#.$$.$$.$#.", +".#..$.$.$.# ", +" #.$..$...#.", +".#.$$.$.$.#.", +".@########. ", +" ...@@.@@. ", +" .@@.@@. ", +" .. .. "}; Index: gnomeicu-occ.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-occ.xpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomeicu-occ.xpm 23 Feb 2002 23:24:32 -0000 1.3 +++ gnomeicu-occ.xpm 7 Mar 2002 00:29:59 -0000 1.4 @@ -1,28 +1,22 @@ /* XPM */ static char * icon_occ_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 6 1", -" c black", -". c #00fc00", -"X c #f80000", -"o c #808080", -"O c #f8fcf8", -"+ c None", -/* pixels */ -"+++++++ +++++++", -"++++++ O. + ++", -"++ + O . O. +", -"+ O o O.. +", -"+ O. O O.. ++", -"++ O O +++", -" XX O XXX ++", -" XX O X +", -"+ XX OOo X +", -"+ OOOOO ", -" O.. OO O O +", -" O.. oO OO O +", -" OO O. O oO +", -"+ + O. OOO Oo +", -"++++ O oOOOO ++", -"++++ + ++" -}; +"12 12 7 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #808080", +"# c #00FC00", +"$ c #F8FCF8", +"% c #F80000", +" ..... ", +" .+.@.#. ", +" ...$..... ", +" .%%.$.%%...", +".%...$....%.", +"..%%..$$.%. ", +" ....$$$$...", +".+##.$..$.$.", +".##..$.$$.$.", +" ....$...@$.", +" ..@$$$$..", +" ....... "}; Index: gnomeicu-offline.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-offline.xpm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gnomeicu-offline.xpm 23 Feb 2002 23:24:32 -0000 1.4 +++ gnomeicu-offline.xpm 7 Mar 2002 00:29:59 -0000 1.5 @@ -1,27 +1,20 @@ /* XPM */ static char * icon_offline_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 5 1", -" c black", -". c #f80000", -"X c #f8fc00", -"o c #f8fcf8", -"O c None", -/* pixels */ -"OOOOOOO OOOOOOO", -"OOOOOO o. O OO", -"OO O o.. o. O", -"O o o.. o.. O", -"O o. o.. o.. OO", -"OO o. o o. OOO", -" o. OOO", -" o.. oXX o. OO", -"O oo. oXX o... O", -"O oX o.. ", -" o.. O", -" o.. o. o. OOO", -" oo o. o... OO", -"O O o. o.. OO", -"OOOO o O o OO", -"OOOO OOOO OOO" -}; +"12 12 5 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #F80000", +"# c #F8FC00", +" .. .. ", +" .+@.+@. ", +" .@@.@@... ", +" ...@.@@.+@.", +".+@@....+@@.", +".@@@.+#.... ", +" ....##.+@@.", +".+@@....@@@.", +".@@.+@.+... ", +" ...@@.@@. ", +" .@@.@@. ", +" .. .. "}; Index: gnomeicu-online.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-online.xpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gnomeicu-online.xpm 23 Feb 2002 23:24:32 -0000 1.3 +++ gnomeicu-online.xpm 7 Mar 2002 00:29:59 -0000 1.4 @@ -1,27 +1,20 @@ /* XPM */ static char * icon_online_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 5 1", -" c black", -". c #00fc00", -"X c #f8fc00", -"o c #f8fcf8", -"O c None", -/* pixels */ -"OOOOOOO OOOOOOO", -"OOOOOO o. O OO", -"OO O o.. o. O", -"O o o.. o.. O", -"O o. o.. o.. OO", -"OO o. o o. OOO", -" o. OOO", -" o.. oXX o. OO", -"O oo. oXX o... O", -"O oX o.. ", -" o.. O", -" o.. o. o. OOO", -" oo o. o... OO", -"O O o. o.. OO", -"OOOO o O o OO", -"OOOO OOOO OOO" -}; +"12 12 5 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #00FC00", +"# c #F8FC00", +" .. .. ", +" .+@.+@. ", +" .@@.@@... ", +" ...@.@@.+@.", +".+@@....+@@.", +".@@@.+#.... ", +" ....##.+@@.", +".+@@....@@@.", +".@@.+@.+... ", +" ...@@.@@. ", +" .@@.@@. ", +" .. .. "}; |
From: Sean E. <sea...@us...> - 2002-03-06 17:04:40
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20976/src Modified Files: conversation.c Log Message: Everyone should just use gdkpixbuf anyway. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.334 retrieving revision 1.335 diff -u -d -r1.334 -r1.335 --- conversation.c 6 Mar 2002 05:26:58 -0000 1.334 +++ conversation.c 6 Mar 2002 17:04:36 -0000 1.335 @@ -3313,6 +3313,7 @@ void set_anim() { +#if USE_PIXBUF GList *c = conversations; while (c) { if(im_options & OPT_IM_NO_ANIMATION) @@ -3321,6 +3322,7 @@ start_anim(NULL, c->data); c = c->next; } +#endif } static void remove_checkbox(struct conversation *c) |