diff options
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r-- | protocols/jabber/presence.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 8004ed40..75e8786c 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -53,6 +53,8 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) return XT_HANDLED; } +/* Send the <presence/> tag that finalizes the whole login process, from here + we'll actually show up as online to our buddies. */ int presence_announce( struct gaim_connection *gc ) { struct xt_node *node; @@ -68,3 +70,20 @@ int presence_announce( struct gaim_connection *gc ) xt_free_node( node ); return st; } + +int presence_send( struct gaim_connection *gc, char *to, char *show, char *status ) +{ + struct xt_node *node; + int st; + + node = jabber_make_packet( "presence", NULL, to, NULL ); + if( show ) + xt_add_child( node, xt_new_node( "show", show, NULL ) ); + if( status ) + xt_add_child( node, xt_new_node( "status", status, NULL ) ); + + st = jabber_write_packet( gc, node ); + + xt_free_node( node ); + return st; +} |