Changeset a325ebd for protocols/msn
- Timestamp:
- 2012-09-16T21:44:09Z (12 years ago)
- Branches:
- master
- Children:
- c6fc24a
- Parents:
- fe79de66
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
rfe79de66 ra325ebd 675 675 else if( g_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 ) 676 676 { 677 /* Sorry, but this one really is *USELESS* */ 677 } 678 else if( g_strncasecmp( ct, "text/x-msmsgsinitialmdatanotification", 37 ) == 0 || 679 g_strncasecmp( ct, "text/x-msmsgsoimnotification", 28 ) == 0 ) 680 { 681 /* We received an offline message. Or at least notification 682 that there is one waiting for us. Fetching the message(s) 683 and purging them from the server is a lot of SOAPy work 684 not worth doing IMHO. Also I thought it was possible to 685 have the notification server send them directly, I was 686 pretty sure I saw Pidgin do it.. 687 688 At least give a notification for now, seems like a 689 reasonable thing to do. Only problem is, they'll keep 690 coming back at login time until you read them using a 691 different client. :-( */ 692 693 char *xml = get_rfc822_header( body, "Mail-Data:", blen ); 694 struct xt_node *md, *m; 695 696 if( !xml ) 697 return 1; 698 md = xt_from_string( xml ); 699 if( !md ) 700 return 1; 701 702 for( m = md->children; ( m = xt_find_node( m, "M" ) ); m = m->next ) 703 { 704 struct xt_node *e = xt_find_node( m->children, "E" ); 705 struct xt_node *rt = xt_find_node( m->children, "RT" ); 706 struct tm tp; 707 time_t msgtime = 0; 708 709 if( !e || !e->text ) 710 continue; 711 712 memset( &tp, 0, sizeof( tp ) ); 713 if( rt && rt->text && 714 sscanf( rt->text, "%4d-%2d-%2dT%2d:%2d:%2d.", 715 &tp.tm_year, &tp.tm_mon, &tp.tm_mday, 716 &tp.tm_hour, &tp.tm_min, &tp.tm_sec ) == 6 ) 717 { 718 tp.tm_year -= 1900; 719 tp.tm_mon --; 720 msgtime = mktime_utc( &tp ); 721 722 } 723 imcb_buddy_msg( ic, e->text, "<< \002BitlBee\002 - Received offline message. BitlBee can't show these. >>", 0, msgtime ); 724 } 725 726 g_free( xml ); 727 xt_free_node( md ); 678 728 } 679 729 else
Note: See TracChangeset
for help on using the changeset viewer.