Ignore:
Timestamp:
2010-03-12T19:10:16Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
dde9d571
Parents:
08e5bb2 (diff), 8b6b740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r08e5bb2 rbe609ff  
    8282        s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc );
    8383        s->flags |= ACC_SET_OFFLINE_ONLY;
     84       
     85        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE;
    8486}
    8587
     
    358360        while( bud )
    359361        {
    360                 imcb_log( ic, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
    361                                    bud->full_jid, bud->priority,
    362                                    bud->away_state ? bud->away_state->full_name : "(none)",
    363                                    bud->away_message ? : "(none)" );
     362                imcb_log( ic, "Buddy %s (%d) information:", bud->full_jid, bud->priority );
     363                if( bud->away_state )
     364                        imcb_log( ic, "Away state: %s", bud->away_state->full_name );
     365                imcb_log( ic, "Status message: %s", bud->away_message ? : "(none)" );
     366               
    364367                bud = bud->next;
    365368        }
     
    371374{
    372375        struct jabber_data *jd = ic->proto_data;
    373         struct jabber_away_state *state;
    374        
    375         /* Save all this info. We need it, for example, when changing the priority setting. */
    376         state = (void *) jabber_away_state_by_name( state_txt );
    377         jd->away_state = state ? state : (void *) jabber_away_state_list; /* Fall back to "Away" if necessary. */
     376       
     377        /* state_txt == NULL -> Not away.
     378           Unknown state -> fall back to the first defined away state. */
     379        jd->away_state = state_txt ? jabber_away_state_by_name( state_txt )
     380                         ? : jabber_away_state_list : NULL;
     381       
    378382        g_free( jd->away_message );
    379383        jd->away_message = ( message && *message ) ? g_strdup( message ) : NULL;
Note: See TracChangeset for help on using the changeset viewer.