Changeset 0b4a0db for protocols/jabber
- Timestamp:
- 2006-09-20T20:26:47Z (18 years ago)
- Branches:
- master
- Children:
- dd788bb
- Parents:
- 70f6aab8
- Location:
- protocols/jabber
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r70f6aab8 r0b4a0db 87 87 return st ? XT_HANDLED : XT_ABORT; 88 88 } 89 if( strcmp( type, "result" ) == 0 && xmlns && strcmp( xmlns, "jabber:iq:roster" ) == 0 ) 90 { 91 struct xt_node *node; 92 93 node = query->children; 94 while( ( node = xt_find_node( node, "item" ) ) ) 95 { 96 char *jid = xt_find_attr( node, "jid" ); 97 char *name = xt_find_attr( node, "name" ); 98 char *sub = xt_find_attr( node, "subscription" ); 99 100 if( jid && sub && ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) ) 101 add_buddy( gc, NULL, jid, name ); 102 103 node = node->next; 104 } 105 106 presence_announce( gc ); 107 } 89 108 else if( strcmp( type, "result" ) == 0 ) 90 109 { -
protocols/jabber/jabber.h
r70f6aab8 r0b4a0db 42 42 43 43 xt_status jabber_pkt_message( struct xt_node *node, gpointer data ); 44 45 /* presence.c */ 44 46 xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ); 47 int presence_announce( struct gaim_connection *gc ); 45 48 46 49 /* jabber_util.c */ -
protocols/jabber/presence.c
r70f6aab8 r0b4a0db 34 34 } 35 35 36 int presence_announce( struct gaim_connection *gc ) 37 { 38 struct xt_node *node; 39 int st; 40 41 node = jabber_make_packet( "presence", NULL, NULL, NULL ); 42 43 st = jabber_write_packet( gc, node ); 44 45 if( st ) 46 account_online( gc ); 47 48 xt_free_node( node ); 49 return st; 50 }
Note: See TracChangeset
for help on using the changeset viewer.