diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-24 12:25:41 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-24 12:25:41 +0200 |
commit | 172a73f1a4b37fa20d1d50496a3faccb8fe6c769 (patch) | |
tree | daffad6b274d33928faa471303477761f13c6b4c /protocols/jabber/presence.c | |
parent | 5e202b09f2cd9faff5f316ae6804facb5342eace (diff) |
Updated <presence> stuff to handle changing the priority setting.
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r-- | protocols/jabber/presence.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 18ce969b..d9053c5f 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -53,16 +53,24 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) return XT_HANDLED; } -int presence_send( struct gaim_connection *gc, char *to, char *show, char *status ) +/* Whenever presence information is updated, call this function to inform the + server. */ +int presence_send_update( struct gaim_connection *gc ) { + struct jabber_data *jd = gc->proto_data; struct xt_node *node; + char *show = jd->away_state->code; + char *status = jd->away_message; int st; - node = jabber_make_packet( "presence", NULL, to, NULL ); + node = jabber_make_packet( "presence", NULL, NULL, NULL ); if( show && *show ) xt_add_child( node, xt_new_node( "show", show, NULL ) ); if( status ) xt_add_child( node, xt_new_node( "status", status, NULL ) ); + /* if( set_getint( &gc->acc->set, "priority" ) != 0 ) */ + /* Let's just send this every time... */ + xt_add_child( node, xt_new_node( "priority", set_getstr( &gc->acc->set, "priority" ), NULL ) ); st = jabber_write_packet( gc, node ); |