From: Sean E. <sea...@us...> - 2002-03-06 00:18:06
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv21133/src/protocols/msn Modified Files: msn.c Log Message: Lots of people have a problem with people who were added to their MSN reverse list while they were offline, not being prompted to add them to their allow list. Jason Willis fixed that. Also added a global buddy icon animation preference by Luke Schierer. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- msn.c 4 Mar 2002 04:18:02 -0000 1.54 +++ msn.c 6 Mar 2002 00:18:02 -0000 1.55 @@ -699,7 +699,6 @@ return; } build_allow_list(); /* er. right. we'll need to have a thing for this in CUI too */ - show_got_added(map->gc, NULL, map->user, map->friend, NULL); } @@ -847,6 +846,10 @@ serv_got_update(gc, user, 1, 0, 0, 0, status, 0); } else if (!g_strncasecmp(buf, "LST", 3)) { 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 */ + char msg[MSN_BUF_LEN]; + int new = 1; int pos, tot; GET_NEXT(tmp); @@ -874,8 +877,25 @@ } else if (!g_strcasecmp(which, "BL") && pos) { gc->deny = g_slist_append(gc->deny, g_strdup(who)); } else if (!g_strcasecmp(which, "RL")) { - if (pos != tot) - return 1; + while(perm) { + if(!g_strcasecmp(perm->data, who)) + new = 0; + perm = perm->next; + } + + if(new) { + debug_printf("Unresolved MSN RL entry"); + ap = g_new0(struct msn_add_permit, 1); + ap->user = g_strdup(who); + ap->friend = g_strdup(friend); + ap->gc = gc; + + g_snprintf(msg, sizeof(msg), "The user %s (%s) wants to add you to their buddy list",ap->user, url_decode(ap->friend)); + do_ask_dialog(msg, ap, msn_accept_add, msn_cancel_add); + } + + if (pos != tot) + return 1; /* this isn't the last one in the RL, so return. */ g_snprintf(sendbuf, sizeof(sendbuf), "CHG %d NLN\r\n", ++md->trId); if (msn_write(md->fd, sendbuf, strlen(sendbuf)) < 0) { |