aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/msn_util.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-15 19:46:10 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-15 19:46:10 +0100
commite0e15468835d5ae5bce54a28bd7a5b7aea66a1e2 (patch)
treee0441f195514b8ad0318f577ea2c09de0b4469b3 /protocols/msn/msn_util.c
parent9b01339168bc79d08c4e371552cc44648bd8878d (diff)
Making display name code a bit saner. Apparently PoS MSN is still suffering
from display_name amnesia a little bit though at least with Hotmail accounts.
Diffstat (limited to 'protocols/msn/msn_util.c')
-rw-r--r--protocols/msn/msn_util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c
index cf8ab4db..78f81a41 100644
--- a/protocols/msn/msn_util.c
+++ b/protocols/msn/msn_util.c
@@ -597,3 +597,19 @@ struct msn_group *msn_group_by_id( struct im_connection *ic, const char *id )
return NULL;
}
+
+int msn_ns_set_display_name( struct im_connection *ic, const char *value )
+{
+ struct msn_data *md = ic->proto_data;
+ char fn[strlen(value)*3+1];
+ char buf[512];
+
+ strcpy( fn, value );
+ http_encode( fn );
+ g_snprintf( buf, sizeof( buf ), "PRP %d MFN %s\r\n",
+ ++md->trId, fn );
+
+ /* Note: We don't actually know if the server accepted the new name,
+ and won't give proper feedback yet if it doesn't. */
+ return msn_write( ic, buf, strlen( buf ) );
+}