Changeset 6bbb939 for protocols/jabber


Ignore:
Timestamp:
2007-04-16T04:01:13Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
cfc8d58
Parents:
84b045d
Message:

Split serv_got_update() into imcb_buddy_(status|times). (Well, the second
one isn't implemented yet, but I'll do that later.) At last I got rid of
the hack called get_status_string(). And now Yahoo seems to mess up away
messages...

Location:
protocols/jabber
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r84b045d r6bbb939  
    388388                                   just try to handle this as well as we can. */
    389389                                jabber_buddy_remove_bare( ic, jid );
    390                                 serv_got_update( ic, jid, 0, 0, 0, 0, 0, 0 );
     390                                imcb_buddy_status( ic, jid, 0, NULL, NULL );
    391391                                /* FIXME! */
    392392                        }
  • protocols/jabber/presence.c

    r84b045d r6bbb939  
    3838        if( type == NULL )
    3939        {
     40                int is_away = 0;
     41               
    4042                if( !( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT | GET_BUDDY_CREAT ) ) )
    4143                {
     
    5254               
    5355                if( ( c = xt_find_node( node->children, "show" ) ) && c->text_len > 0 )
     56                {
    5457                        bud->away_state = (void*) jabber_away_state_by_code( c->text );
     58                        if( strcmp( c->text, "chat" ) != 0 )
     59                                is_away = OPT_AWAY;
     60                }
    5561                else
    5662                {
     
    6672                        bud->priority = 0;
    6773               
    68                 serv_got_update( ic, bud->bare_jid, 1, 0, 0, 0,
    69                                  bud->away_state ? UC_UNAVAILABLE : 0, 0 );
     74                /* FIXME: What to send if there are other resources??? */
     75                imcb_buddy_status( ic, bud->bare_jid, OPT_LOGGED_IN | is_away,
     76                                   bud->away_state->full_name, bud->away_message );
    7077        }
    7178        else if( strcmp( type, "unavailable" ) == 0 )
     
    8794                           available anymore. */
    8895                        if( jabber_buddy_by_jid( ic, from, 0 ) == NULL )
    89                                 serv_got_update( ic, from, 0, 0, 0, 0, 0, 0 );
     96                                imcb_buddy_status( ic, from, 0, NULL, NULL );
    9097                       
    9198                        *s = '/';
     
    93100                else
    94101                {
    95                         serv_got_update( ic, from, 0, 0, 0, 0, 0, 0 );
     102                        imcb_buddy_status( ic, from, 0, NULL, NULL );
    96103                }
    97104        }
Note: See TracChangeset for help on using the changeset viewer.