Changeset 208db4b for protocols/msn/ns.c


Ignore:
Timestamp:
2012-09-29T19:38:18Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4c9d377
Parents:
3901b5d
Message:

Support for sending messages to federated contacts. They don't seem to arrive
but Pidgin seems to have the same problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    r3901b5d r208db4b  
    972972{
    973973        struct msn_data *md = ic->proto_data;
    974         char *buf;
     974        int type = 0;
     975        char *buf, *handle;
    975976       
    976977        if( strncmp( text, "\r\r\r", 3 ) == 0 )
     
    979980                return 1;
    980981       
     982        /* This might be a federated contact. Get its network number,
     983           prefixed to bu->handle with a colon. Default is 1. */
     984        for( handle = bu->handle; isdigit( *handle ); handle ++ )
     985                type = type * 10 + *handle - '0';
     986        if( *handle == ':' )
     987                handle ++;
     988        else
     989                type = 1;
     990       
    981991        buf = g_strdup_printf( "%s%s", MSN_MESSAGE_HEADERS, text );
    982992       
    983993        if( msn_ns_write( ic, -1, "UUM %d %s %d %d %zd\r\n%s",
    984                                   ++md->trId, bu->handle,
    985                                   1, /* type == MSN (offline) message */
     994                                  ++md->trId, handle, type,
    986995                                  1, /* type == IM (not nudge/typing) */
    987996                                  strlen( buf ), buf ) )
Note: See TracChangeset for help on using the changeset viewer.