aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/ns.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-14 13:20:59 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-14 13:20:59 +0100
commitd93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a (patch)
tree9e74aa23cefbe17dc4ab519ef113d7537d91342d /protocols/msn/ns.c
parent12767e39dbafc36d54995727ff2c6043e8292f16 (diff)
Read incoming MSN status/away messages.
Diffstat (limited to 'protocols/msn/ns.c')
-rw-r--r--protocols/msn/ns.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index 40f96b21..0c067b8c 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -576,6 +576,13 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
if( num_parts >= 4 )
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] ) )
{
int num = atoi( cmd[0] );
@@ -685,6 +692,19 @@ static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int
g_free( ct );
}
}
+ 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 );
}