Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision f9258aead615ef9b87baa1754777fd5faf867fe1)
+++ protocols/msn/msn.c	(revision 080c43a862bca535e51682423afc9d0f75ea1d02)
@@ -191,9 +191,27 @@
 		md->away_state = msn_away_state_list + 1;
 	
-	if( !msn_ns_write( ic, -1, "CHG %d %s\r\n", ++md->trId, md->away_state->code ) )
+	if( !msn_ns_write( ic, -1, "CHG %d %s %d:%02d\r\n", ++md->trId, md->away_state->code, MSN_CAP1, MSN_CAP2 ) )
 		return;
 	
-	uux = g_markup_printf_escaped( "<Data><PSM>%s</PSM><CurrentMedia></CurrentMedia>"
-	                               "</Data>", message ? message : "" );
+	uux = g_markup_printf_escaped( "<EndpointData><Capabilities>%d:%02d"
+	                               "</Capabilities></EndpointData>",
+	                               MSN_CAP1, MSN_CAP2 );
+	msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux );
+	g_free( uux );
+	
+	uux = g_markup_printf_escaped( "<PrivateEndpointData><EpName>%s</EpName>"
+	                               "<Idle>%s</Idle><ClientType>%d</ClientType>"
+	                               "<State>%s</State></PrivateEndpointData>",
+	                               md->uuid,
+	                               strcmp( md->away_state->code, "IDL" ) ? "false" : "true",
+	                               1, /* ? */
+	                               md->away_state->code );
+	msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux );
+	g_free( uux );
+	
+	uux = g_markup_printf_escaped( "<Data><DDP></DDP><PSM>%s</PSM>"
+	                               "<CurrentMedia></CurrentMedia>"
+	                               "<MachineGuid>%s</MachineGuid></Data>",
+	                               message ? message : "", md->uuid );
 	msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux );
 	g_free( uux );
Index: protocols/msn/msn.h
===================================================================
--- protocols/msn/msn.h	(revision f9258aead615ef9b87baa1754777fd5faf867fe1)
+++ protocols/msn/msn.h	(revision 080c43a862bca535e51682423afc9d0f75ea1d02)
@@ -64,4 +64,7 @@
 
 #define MSN_SB_NEW         -24062002
+
+#define MSN_CAP1        0xC000
+#define MSN_CAP2        0x0000
 
 #define MSN_MESSAGE_HEADERS "MIME-Version: 1.0\r\n" \
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision f9258aead615ef9b87baa1754777fd5faf867fe1)
+++ protocols/msn/ns.c	(revision 080c43a862bca535e51682423afc9d0f75ea1d02)
@@ -574,6 +574,6 @@
 	{
 		/* Status message. */
-		if( num_parts >= 4 )
-			handler->msglen = atoi( cmd[3] );
+		if( num_parts >= 3 )
+			handler->msglen = atoi( cmd[2] );
 	}
 	else if( strcmp( cmd[0], "NOT" ) == 0 )
Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision f9258aead615ef9b87baa1754777fd5faf867fe1)
+++ protocols/msn/sb.c	(revision 080c43a862bca535e51682423afc9d0f75ea1d02)
@@ -308,4 +308,5 @@
 	struct msn_switchboard *sb = data;
 	struct im_connection *ic;
+	struct msn_data *md;
 	char buf[1024];
 	
@@ -315,4 +316,5 @@
 	
 	ic = sb->ic;
+	md = ic->proto_data;
 	
 	if( source != sb->fd )
@@ -332,7 +334,7 @@
 	
 	if( sb->session == MSN_SB_NEW )
-		g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->acc->user, sb->key );
+		g_snprintf( buf, sizeof( buf ), "USR %d %s;{%s} %s\r\n", ++sb->trId, ic->acc->user, md->uuid, sb->key );
 	else
-		g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->acc->user, sb->key, sb->session );
+		g_snprintf( buf, sizeof( buf ), "ANS %d %s;{%s} %s %d\r\n", ++sb->trId, ic->acc->user, md->uuid, sb->key, sb->session );
 	
 	if( msn_sb_write( sb, "%s", buf ) )
@@ -462,5 +464,10 @@
 			}
 			
-			imcb_chat_add_buddy( sb->chat, cmd[4] );
+			/* For as much as I understand this MPOP stuff now, a
+			   switchboard has two (or more) roster entries per
+			   participant. One "bare JID" and one JID;UUID. Ignore
+			   the latter. */
+			if( !strchr( cmd[4], ';' ) )
+				imcb_chat_add_buddy( sb->chat, cmd[4] );
 			
 			if( num == tot )
@@ -506,4 +513,8 @@
 			return( 0 );
 		}
+		
+		/* See IRO above. Handle "bare JIDs" only. */
+		if( strchr( cmd[1], ';' ) )
+			return 1;
 		
 		if( sb->who && g_strcasecmp( cmd[1], sb->who ) == 0 )
@@ -541,4 +552,8 @@
 			return( st );
 		}
+		else if( strcmp( cmd[1], ic->acc->user ) == 0 )
+		{
+			/* Well, gee thanks. Thanks for letting me know I've arrived.. */
+		}
 		else if( sb->who )
 		{
