Index: protocols/bee.h
===================================================================
--- protocols/bee.h	(revision 12767e39dbafc36d54995727ff2c6043e8292f16)
+++ protocols/bee.h	(revision d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a)
@@ -148,4 +148,5 @@
  * - 'state' and 'message' can be NULL */
 G_MODULE_EXPORT void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message );
+G_MODULE_EXPORT void imcb_buddy_status_msg( struct im_connection *ic, const char *handle, const char *message );
 G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle );
 /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */
Index: protocols/bee_user.c
===================================================================
--- protocols/bee_user.c	(revision 12767e39dbafc36d54995727ff2c6043e8292f16)
+++ protocols/bee_user.c	(revision d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a)
@@ -187,6 +187,11 @@
 	/* TODO(wilmer): OPT_AWAY, or just state == NULL ? */
 	bu->flags = flags;
-	bu->status = g_strdup( ( flags & OPT_AWAY ) && state == NULL ? "Away" : state );
 	bu->status_msg = g_strdup( message );
+	if( state && *state )
+		bu->status = g_strdup( state );
+	else if( flags & OPT_AWAY )
+		bu->status = g_strdup( "Away" );
+	else
+		bu->status = NULL;
 	
 	if( bee->ui->user_status )
@@ -198,4 +203,26 @@
 }
 
+/* Same, but only change the away/status message, not any away/online state info. */
+void imcb_buddy_status_msg( struct im_connection *ic, const char *handle, const char *message )
+{
+	bee_t *bee = ic->bee;
+	bee_user_t *bu, *old;
+	
+	if( !( bu = bee_user_by_handle( bee, ic, handle ) ) )
+	{
+		return;
+	}
+	
+	old = g_memdup( bu, sizeof( bee_user_t ) );
+	
+	bu->status_msg = g_strdup( message );
+	
+	if( bee->ui->user_status )
+		bee->ui->user_status( bee, bu, old );
+	
+	g_free( old->status_msg );
+	g_free( old );
+}
+
 void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle )
 {
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision 12767e39dbafc36d54995727ff2c6043e8292f16)
+++ protocols/msn/ns.c	(revision d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a)
@@ -577,4 +577,11 @@
 			md->handler->msglen = atoi( cmd[3] );
 	}
+	else if( strcmp( cmd[0], "NOT" ) == 0 )
+	{
+		/* Some kind of notification, not sure if it still exists
+		   but we have to skip the payload or stuff breaks. */
+		if( num_parts >= 3 )
+			md->handler->msglen = atoi( cmd[2] );
+	}
 	else if( isdigit( cmd[0][0] ) )
 	{
@@ -686,4 +693,17 @@
 		}
 	}
+	else if( strcmp( cmd[0], "UBX" ) == 0 )
+	{
+		struct xt_node *psm;
+		char *psm_text = NULL;
+		
+		psm = xt_from_string( msg );
+		if( psm && strcmp( psm->name, "Data" ) == 0 &&
+		    ( psm = xt_find_node( psm->children, "PSM" ) ) )
+			psm_text = psm->text;
+		
+		imcb_buddy_status_msg( ic, cmd[1], psm_text );
+		xt_free_node( psm );
+	}
 	
 	return( 1 );
Index: protocols/msn/soap.h
===================================================================
--- protocols/msn/soap.h	(revision 12767e39dbafc36d54995727ff2c6043e8292f16)
+++ protocols/msn/soap.h	(revision d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a)
@@ -1,23 +1,29 @@
-/* soap.h
- *
- * SOAP-related functions. Some manager at Microsoft apparently thought
- * MSNP wasn't XMLy enough so someone stepped up and changed that. This
- * is the result.
- *
- * Copyright (C) 2010 Wilmer van der Gaast <wilmer@gaast.net>
- *
- * This program is free software; you can redistribute it and/or modify             
- * it under the terms of the GNU General Public License version 2                   
- * as published by the Free Software Foundation                                     
- *                                                                                   
- * This program is distributed in the hope that is will be useful,                  
- * bit WITHOU ANY WARRANTY; without even the implied warranty of                   
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                    
- * GNU General Public License for more details.                                     
- *                                                                                   
- * You should have received a copy of the GNU General Public License                
- * along with this program; if not, write to the Free Software                      
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA          
- */
+  /********************************************************************\
+  * BitlBee -- An IRC to other IM-networks gateway                     *
+  *                                                                    *
+  * Copyright 2002-2010 Wilmer van der Gaast and others                *
+  \********************************************************************/
+
+/* MSN module - All the SOAPy XML stuff.
+   Some manager at Microsoft apparently thought MSNP wasn't XMLy enough so
+   someone stepped up and changed that. This is the result. Kilobytes and
+   more kilobytes of XML vomit to transfer tiny bits of informaiton. */
+
+/*
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License with
+  the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
+  if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+  Suite 330, Boston, MA  02111-1307  USA
+*/
 
 /* Thanks to http://msnpiki.msnfanatic.com/ for lots of info on this! */
