Changeset 389f7be


Ignore:
Timestamp:
2009-10-06T22:55:46Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0cbef26
Parents:
d250b2a
Message:

Support for sending messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    rd250b2a r389f7be  
    160160static int purple_buddy_msg( struct im_connection *ic, char *who, char *message, int flags )
    161161{
     162        PurpleConversation *conv;
     163       
     164        if( ( conv = purple_find_conversation_with_account( PURPLE_CONV_TYPE_IM,
     165                                                            who, ic->proto_data ) ) == NULL )
     166        {
     167                conv = purple_conversation_new( PURPLE_CONV_TYPE_IM,
     168                                                ic->proto_data, who );
     169        }
     170       
     171        purple_conv_im_send( purple_conversation_get_im_data( conv ), message );
    162172}
    163173
     
    293303        struct im_connection *ic = purple_ic_by_pa( conv->account );
    294304       
    295         imcb_buddy_msg( ic, (char*) who, (char*) message, 0, mtime );
     305        /* ..._SEND means it's an outgoing message, no need to echo those. */
     306        if( !( flags & PURPLE_MESSAGE_SEND ) )
     307                imcb_buddy_msg( ic, (char*) who, (char*) message, 0, mtime );
    296308}
    297309
Note: See TracChangeset for help on using the changeset viewer.