Changeset f0cb961 for protocols/jabber/iq.c
- Timestamp:
- 2007-04-19T06:03:43Z (17 years ago)
- Branches:
- master
- Children:
- d323394c
- Parents:
- 33dc261
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r33dc261 rf0cb961 360 360 while( ( c = xt_find_node( c, "item" ) ) ) 361 361 { 362 struct xt_node *group = xt_find_node( node->children, "group" ); 362 363 char *jid = xt_find_attr( c, "jid" ); 363 364 char *name = xt_find_attr( c, "name" ); 364 365 char *sub = xt_find_attr( c, "subscription" ); 365 366 366 if( !jid || !sub ) 367 { 368 /* Maybe warn. But how likely is this to happen in the first place? */ 369 } 370 else if( initial ) 371 { 372 if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) ) 373 add_buddy( ic, NULL, jid, name ); 374 } 375 else 376 { 377 /* This is a roster push item. Find out what changed exactly. */ 367 if( jid && sub ) 368 { 378 369 if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) ) 379 370 { 380 if( find_buddy( ic, jid ) == NULL ) 381 add_buddy( ic, NULL, jid, name ); 382 else if( name ) 383 serv_buddy_rename( ic, jid, name ); 371 if( initial || imcb_find_buddy( ic, jid ) == NULL ) 372 imcb_add_buddy( ic, jid, ( group && group->text_len ) ? 373 group->text : NULL ); 374 375 imcb_rename_buddy( ic, jid, name ); 384 376 } 385 377 else if( strcmp( sub, "remove" ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.