changeset 2747:51fc8e5acd7a

[gaim-migrate @ 2760] alan committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 18 Nov 2001 07:41:01 +0000
parents a0da8be3db45
children 497868102c90
files src/protocols/msn/msn.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Sun Nov 18 05:42:08 2001 +0000
+++ b/src/protocols/msn/msn.c	Sun Nov 18 07:41:01 2001 +0000
@@ -669,9 +669,12 @@
 static void msn_accept_add(gpointer w, struct msn_add_permit *map)
 {
 	struct msn_data *md = map->gc->proto_data;
+	char *user;
 	char buf[MSN_BUF_LEN];
 
-	g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, map->user, map->friend);
+	user = g_strdup(url_encode(map->user));
+	g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, user, url_encode(map->friend));
+	g_free(user);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(map->gc, "Write error");
 		signoff(map->gc);
@@ -1709,6 +1712,7 @@
 	if (l)
 		return;
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "ADD %d FL %s %s\r\n", ++md->trId, who, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");
@@ -1722,6 +1726,7 @@
 	struct msn_data *md = gc->proto_data;
 	char buf[MSN_BUF_LEN];
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "REM %d FL %s\r\n", ++md->trId, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");
@@ -1820,6 +1825,7 @@
 			t = g_slist_append(t, who);
 			continue;
 		}
+		who = url_encode(who);
 		g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who);
 		if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 			hide_login_progress(gc, "Write error");
@@ -1847,6 +1853,7 @@
 			t = g_slist_append(t, who);
 			continue;
 		}
+		who = url_encode(who);
 		g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who);
 		if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 			hide_login_progress(gc, "Write error");
@@ -1878,6 +1885,7 @@
 		return;
 	}
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");
@@ -1891,6 +1899,7 @@
 	struct msn_data *md = gc->proto_data;
 	char buf[MSN_BUF_LEN];
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "REM %d AL %s\r\n", ++md->trId, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");
@@ -1911,6 +1920,7 @@
 		return;
 	}
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, who, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");
@@ -1924,6 +1934,7 @@
 	struct msn_data *md = gc->proto_data;
 	char buf[MSN_BUF_LEN];
 
+	who = url_encode(who);
 	g_snprintf(buf, sizeof(buf), "REM %d BL %s\r\n", ++md->trId, who);
 	if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 		hide_login_progress(gc, "Write error");