Mercurial > pidgin
diff src/protocols/msn/msn.c @ 3456:b48065e52337
[gaim-migrate @ 3503]
A few patches. Brian--tell me what your last name is, and I'll put it in. ;)
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Wed, 28 Aug 2002 02:38:19 +0000 |
| parents | 0a0cc45267d4 |
| children | 7a3f16a375a5 |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Tue Aug 27 22:22:55 2002 +0000 +++ b/src/protocols/msn/msn.c Wed Aug 28 02:38:19 2002 +0000 @@ -844,8 +844,8 @@ char buf[MSN_BUF_LEN]; char *srvfriend; - srvfriend = str_to_utf8(url_encode(map->friend)); - g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, map->user, srvfriend); + srvfriend = str_to_utf8(map->friend); + g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, map->user, url_encode(srvfriend)); g_free(srvfriend); if (msn_write(md->fd, buf, strlen(buf)) < 0) { @@ -863,10 +863,10 @@ { struct msn_data *md = map->gc->proto_data; char buf[MSN_BUF_LEN]; - char *srvfriend = str_to_utf8(url_encode(map->friend)); + char *srvfriend = str_to_utf8(map->friend); if (*(map->user)) { - g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, map->user, srvfriend); + g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, map->user, url_encode(srvfriend)); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(map->gc, "Write error"); signoff(map->gc); @@ -1191,7 +1191,9 @@ GET_NEXT(tmp); GET_NEXT(tmp); GET_NEXT(tmp); - friend = utf8_to_str(tmp); + + friend = url_decode(tmp); + friend = utf8_to_str(friend); g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend); g_free(friend); @@ -2115,14 +2117,14 @@ if (!entry || *entry == NULL) alias = g_strdup(""); else - alias = str_to_utf8(url_encode(entry)); + alias = str_to_utf8(entry); if (strlen(alias) >= BUDDY_ALIAS_MAXLEN) { do_error_dialog(_("New MSN friendly name too long."), NULL, GAIM_ERROR); return; } - g_snprintf(buf, sizeof(buf), "REA %d %s %s\r\n", ++md->trId, gc->username, alias); + g_snprintf(buf, sizeof(buf), "REA %d %s %s\r\n", ++md->trId, gc->username, url_encode(alias)); g_free(alias); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error");
