Changeset 9c84617 for protocols/msn


Ignore:
Timestamp:
2010-12-13T00:42:58Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c5920df
Parents:
8eec79d
Message:

Silently adding /CTCP NUDGE support for MSN contacts.

Location:
protocols/msn
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r8eec79d r9c84617  
    352352       
    353353        g_tree_remove( md->domaintree, bu->handle );
     354}
     355
     356GList *msn_buddy_action_list( bee_user_t *bu )
     357{
     358        static GList *ret = NULL;
     359       
     360        if( ret == NULL )
     361        {
     362                static const struct buddy_action ba[2] = {
     363                        { "NUDGE", "Draw attention" },
     364                };
     365               
     366                ret = g_list_prepend( ret, (void*) ba + 0 );
     367        }
     368       
     369        return ret;
     370}
     371
     372void *msn_buddy_action( struct bee_user *bu, const char *action, char * const args[], void *data )
     373{
     374        if( g_strcasecmp( action, "NUDGE" ) == 0 )
     375                msn_buddy_msg( bu->ic, bu->handle, NUDGE_MESSAGE, 0 );
     376       
     377        return NULL;
    354378}
    355379
     
    382406        ret->buddy_data_add = msn_buddy_data_add;
    383407        ret->buddy_data_free = msn_buddy_data_free;
     408        ret->buddy_action_list = msn_buddy_action_list;
     409        ret->buddy_action = msn_buddy_action;
    384410       
    385411        //ret->transfer_request = msn_ftp_transfer_request;
  • protocols/msn/msn.h

    r8eec79d r9c84617  
    3030 */
    3131#define TYPING_NOTIFICATION_MESSAGE "\r\r\rBEWARE, ME R TYPINK MESSAGE!!!!\r\r\r"
     32#define NUDGE_MESSAGE "\r\r\rSHAKE THAT THING\r\r\r"
    3233#define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r"
    3334#define SB_KEEPALIVE_MESSAGE "\r\r\rDONT HANG UP ON ME!\r\r\r"
     
    7071                           "\r\n\r\n"
    7172
    72 #define SB_KEEPALIVE_HEADERS "MIME-Version: 1.0\r\n" \
    73                              "Content-Type: text/x-ping\r\n" \
    74                              "\r\n\r\n"
     73#define MSN_NUDGE_HEADERS "MIME-Version: 1.0\r\n" \
     74                          "Content-Type: text/x-msnmsgr-datacast\r\n" \
     75                          "\r\n" \
     76                          "ID: 1\r\n" \
     77                          "\r\n"
     78
     79#define MSN_SB_KEEPALIVE_HEADERS "MIME-Version: 1.0\r\n" \
     80                                 "Content-Type: text/x-ping\r\n" \
     81                                 "\r\n\r\n"
    7582
    7683#define PROFILE_URL "http://members.msn.com/"
  • protocols/msn/sb.c

    r8eec79d r9c84617  
    184184                        i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->acc->user );
    185185                }
     186                else if( strcmp( text, NUDGE_MESSAGE ) == 0 )
     187                {
     188                        buf = g_strdup( MSN_NUDGE_HEADERS );
     189                        i = strlen( buf );
     190                }
    186191                else if( strcmp( text, SB_KEEPALIVE_MESSAGE ) == 0 )
    187192                {
    188                         buf = g_strdup( SB_KEEPALIVE_HEADERS );
     193                        buf = g_strdup( MSN_SB_KEEPALIVE_HEADERS );
    189194                        i = strlen( buf );
    190195                }
Note: See TracChangeset for help on using the changeset viewer.