changeset 3118:712bc3205d9a

[gaim-migrate @ 3133] This should be good. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 31 Mar 2002 01:38:42 +0000
parents 10616b2a6638
children 62997bfbe8bc
files src/protocols/msn/msn.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Sat Mar 30 20:31:26 2002 +0000
+++ b/src/protocols/msn/msn.c	Sun Mar 31 01:38:42 2002 +0000
@@ -751,12 +751,28 @@
 		signoff(map->gc);
 		return;
 	}
+	map->gc->permit = g_slist_append(map->gc->permit, map->user);
 	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);
+	*(map->user) = 0;
 }
 
 static void msn_cancel_add(gpointer w, struct msn_add_permit *map)
 {
+	struct msn_data *md = map->gc->proto_data;
+	char buf[MSN_BUF_LEN];
+
+	if (*(map->user)) {
+		g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trID, map->user, url_encode(map->friend));
+		if (msn_write(md->fd, buf, strlen(buf)) < 0) {
+			hide_login_progress(map->gc, "Write error");
+			signoff(map->gc);
+			return;
+		}
+		map->gc->deny = g_slist_append(map->gc->deny, map->user);
+		build_block_list();
+	}
+	
 	g_free(map->user);
 	g_free(map->friend);
 	g_free(map);