Changeset dd788bb for protocols/jabber/message.c
- Timestamp:
- 2006-09-21T07:32:39Z (16 years ago)
- Branches:
- master
- Children:
- 4a0614e
- Parents:
- 0b4a0db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/message.c
r0b4a0db rdd788bb 26 26 xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) 27 27 { 28 struct gaim_connection *gc = data; 28 29 char *from = xt_find_attr( node, "from" ); 30 char *type = xt_find_attr( node, "type" ); 29 31 struct xt_node *msg = xt_find_node( node->children, "body" ); 30 32 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 } 33 54 34 55 return XT_HANDLED;
Note: See TracChangeset
for help on using the changeset viewer.