Changeset 09d4922


Ignore:
Timestamp:
2010-11-21T19:34:59Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
9564e55
Parents:
bdedc14
Message:

Be clearer about password settings being intentionally hidden (and not
really empty). Bug #657 and confusing BitlBee users since probably 2002.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rbdedc14 r09d4922  
    123123        s->old_key = g_strdup( "buddy_sendbuffer_delay" );
    124124        s = set_add( &b->set, "password", NULL, set_eval_password, irc );
    125         s->flags |= SET_NULL_OK;
     125        s->flags |= SET_NULL_OK | SET_PASSWORD;
    126126        s = set_add( &b->set, "private", "true", set_eval_bool, irc );
    127127        s = set_add( &b->set, "query_order", "lifo", NULL, irc );
  • protocols/account.c

    rbdedc14 r09d4922  
    6464       
    6565        s = set_add( &a->set, "password", NULL, set_eval_account, a );
    66         s->flags |= ACC_SET_NOSAVE | SET_NULL_OK;
     66        s->flags |= ACC_SET_NOSAVE | SET_NULL_OK | SET_PASSWORD;
    6767       
    6868        s = set_add( &a->set, "tag", NULL, set_eval_account, a );
  • root_commands.c

    rbdedc14 r09d4922  
    274274static void cmd_showset( irc_t *irc, set_t **head, char *key )
    275275{
     276        set_t *set;
    276277        char *val;
    277278       
    278279        if( ( val = set_getstr( head, key ) ) )
    279280                irc_usermsg( irc, "%s = `%s'", key, val );
    280         else if( !set_find( head, key ) )
     281        else if( !( set = set_find( head, key ) ) )
    281282        {
    282283                irc_usermsg( irc, "Setting `%s' does not exist.", key );
     
    285286                                     "See \x02help account set\x02 and \x02help channel set\x02." );
    286287        }
     288        else if( set->flags & SET_PASSWORD )
     289                irc_usermsg( irc, "%s = `********' (hidden)", key );
    287290        else
    288291                irc_usermsg( irc, "%s is empty", key );
  • set.h

    rbdedc14 r09d4922  
    4848        SET_NULL_OK = 0x0100,
    4949        SET_HIDDEN = 0x0200,
     50        SET_PASSWORD = 0x0400,
    5051} set_flags_t;
    5152
Note: See TracChangeset for help on using the changeset viewer.