diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-28 00:18:27 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-28 00:18:27 +0200 |
commit | 42553208d714b80a2a64d334f1659ec379042f8b (patch) | |
tree | 71b2d168be8b7c491d7a7985cdb35b9a271e056b /protocols | |
parent | f6f5eee77be1a91563da38337bb80b04cb2ae071 (diff) |
MSN: Don't show any "special" messages when breaking down switchboards with
queued messages. They were never supposed to be seen by the user. Also,
don't send them all to offline users.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/msn/msn.c | 8 | ||||
-rw-r--r-- | protocols/msn/msn_util.c | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index fe1d16ac..de8271e8 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -300,10 +300,14 @@ static void msn_rem_deny( struct im_connection *ic, char *who ) static int msn_send_typing( struct im_connection *ic, char *who, int typing ) { - if( typing & OPT_TYPING ) + struct bee_user *bu = bee_user_by_handle( ic->bee, ic, who ); + + if( !( bu->flags & BEE_USER_ONLINE ) ) + return 0; + else if( typing & OPT_TYPING ) return( msn_buddy_msg( ic, who, TYPING_NOTIFICATION_MESSAGE, 0 ) ); else - return( 1 ); + return 1; } static char *set_eval_display_name( set_t *set, char *value ) diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index cf119b1a..23447403 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -397,6 +397,7 @@ void msn_msgq_purge( struct im_connection *ic, GSList **list ) struct msn_message *m; GString *ret; GSList *l; + int n = 0; l = *list; if( l == NULL ) @@ -411,7 +412,11 @@ void msn_msgq_purge( struct im_connection *ic, GSList **list ) { m = l->data; - g_string_append_printf( ret, "\n%s", m->text ); + if( strncmp( m->text, "\r\r\r", 3 ) != 0 ) + { + g_string_append_printf( ret, "\n%s", m->text ); + n ++; + } g_free( m->who ); g_free( m->text ); @@ -422,7 +427,8 @@ void msn_msgq_purge( struct im_connection *ic, GSList **list ) g_slist_free( *list ); *list = NULL; - imcb_log( ic, "%s", ret->str ); + if( n > 0 ) + imcb_log( ic, "%s", ret->str ); g_string_free( ret, TRUE ); } |