Ignore:
Timestamp:
2006-09-21T07:32:39Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4a0614e
Parents:
0b4a0db
Message:

Added enough to not make it crash on login, and it can properly receive
messages now. Just try to figure out why it doesn't get typing
notifications...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/message.c

    r0b4a0db rdd788bb  
    2626xt_status jabber_pkt_message( struct xt_node *node, gpointer data )
    2727{
     28        struct gaim_connection *gc = data;
    2829        char *from = xt_find_attr( node, "from" );
     30        char *type = xt_find_attr( node, "type" );
    2931        struct xt_node *msg = xt_find_node( node->children, "body" );
    3032       
    31         printf( "Received MSG from %s: %s\n", from, msg ? msg->text : "<null>" );
    32         xt_print( node );
     33        if( !type || !msg )
     34                return XT_HANDLED;      /* Grmbl... FIXME */
     35       
     36        if( strcmp( type, "chat" ) == 0 )
     37        {
     38                char *s;
     39               
     40                s = strchr( from, '/' );
     41                if( s )
     42                        *s = 0;
     43               
     44                serv_got_im( gc, from, msg->text, 0, 0, 0 );
     45               
     46                if( s )
     47                        *s = '/';
     48        }
     49        else
     50        {
     51                printf( "Received MSG from %s: %s\n", from, msg ? msg->text : "<null>" );
     52                xt_print( node );
     53        }
    3354       
    3455        return XT_HANDLED;
Note: See TracChangeset for help on using the changeset viewer.