Changeset 3901b5d for protocols/msn
- Timestamp:
- 2012-09-25T22:48:56Z (12 years ago)
- Branches:
- master
- Children:
- 208db4b
- Parents:
- ba86713
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
rba86713 r3901b5d 571 571 if( num_parts >= 2 ) 572 572 handler->msglen = atoi( cmd[1] ); 573 } 574 else if( strcmp( cmd[0], "UBM" ) == 0 ) 575 { 576 if( num_parts >= 7 ) 577 handler->msglen = atoi( cmd[6] ); 573 578 } 574 579 else if( isdigit( cmd[0][0] ) ) … … 773 778 continue; 774 779 780 /* FIXME: Use "t" here, guess I should just add it 781 as a prefix like elsewhere in the protocol. */ 775 782 handle = g_strdup_printf( "%s@%s", cn, dn ); 776 783 if( !( ( bu = bee_user_by_handle( ic->bee, ic, handle ) ) || … … 798 805 } 799 806 } 800 801 return( 1 ); 807 else if( strcmp( cmd[0], "UBM" ) == 0 ) 808 { 809 char *ct = get_rfc822_header( msg, "Content-Type", msglen ); 810 char *handle; 811 812 if( strncmp( ct, "text/plain", 10 ) != 0 ) 813 { 814 g_free( ct ); 815 return 1; 816 } 817 if( strcmp( cmd[2], "1" ) != 0 ) 818 handle = g_strdup_printf( "%s:%s", cmd[2], cmd[1] ); 819 else 820 handle = g_strdup( cmd[1] ); 821 822 imcb_buddy_msg( ic, handle, body, 0, 0 ); 823 g_free( handle ); 824 } 825 826 return 1; 802 827 } 803 828 … … 866 891 xt_add_attr( c, "n", handle ); 867 892 xt_add_attr( c, "l", l ); 868 xt_add_attr( c, "t", "1" ); /* 1 means normal, 4 means mobile?*/893 xt_add_attr( c, "t", "1" ); /* FIXME: Network type, i.e. 32 for Y!MSG */ 869 894 xt_insert_child( d, c ); 870 895 … … 958 983 if( msn_ns_write( ic, -1, "UUM %d %s %d %d %zd\r\n%s", 959 984 ++md->trId, bu->handle, 960 1, /* type == MSN offlinemessage */985 1, /* type == MSN (offline) message */ 961 986 1, /* type == IM (not nudge/typing) */ 962 987 strlen( buf ), buf ) )
Note: See TracChangeset
for help on using the changeset viewer.