diff options
author | Sven Moritz Hallberg <pesco@khjk.org> | 2010-06-03 13:00:45 +0200 |
---|---|---|
committer | Sven Moritz Hallberg <pesco@khjk.org> | 2010-06-03 13:00:45 +0200 |
commit | 814aa52228c7cad1d036c1a6dc5ea03cce61c048 (patch) | |
tree | 7db06b9191f00b086f25789a0a040d15cef580cf /protocols/msn/msn_util.c | |
parent | 5f8ab6a9adf09ea7c07f728227bdb6d3953588f1 (diff) | |
parent | f4bcc223fea70de8555bbc4d2caf48e0476c0e13 (diff) |
merge in bitlbee 1.2.6
Diffstat (limited to 'protocols/msn/msn_util.c')
-rw-r--r-- | protocols/msn/msn_util.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 668a8b8a..9c9d2720 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -37,10 +37,10 @@ int msn_write( struct im_connection *ic, char *s, int len ) { imcb_error( ic, "Short write() to main server" ); imc_logout( ic, TRUE ); - return( 0 ); + return 0; } - return( 1 ); + return 1; } int msn_logged_in( struct im_connection *ic ) @@ -376,3 +376,15 @@ void msn_msgq_purge( struct im_connection *ic, GSList **list ) imcb_log( ic, "%s", ret->str ); g_string_free( ret, TRUE ); } + +gboolean msn_set_display_name( struct im_connection *ic, const char *rawname ) +{ + char *fn = msn_http_encode( rawname ); + struct msn_data *md = ic->proto_data; + char buf[1024]; + + g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic->acc->user, fn ); + g_free( fn ); + + return msn_write( ic, buf, strlen( buf ) ) != 0; +} |