diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-11-21 19:34:59 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-11-21 19:34:59 +0000 | 
| commit | 09d4922d3740eb0ad2e42e02ca5d57f03b263eab (patch) | |
| tree | 8deb49d26bf6c54db4330c61711bac8429ea4d7b | |
| parent | bdedc148f84406a4715a1e668ea767927740c790 (diff) | |
Be clearer about password settings being intentionally hidden (and not
really empty). Bug #657 and confusing BitlBee users since probably 2002.
| -rw-r--r-- | irc.c | 2 | ||||
| -rw-r--r-- | protocols/account.c | 2 | ||||
| -rw-r--r-- | root_commands.c | 5 | ||||
| -rw-r--r-- | set.h | 1 | 
4 files changed, 7 insertions, 3 deletions
| @@ -122,7 +122,7 @@ irc_t *irc_new( int fd )  	s = set_add( &b->set, "paste_buffer_delay", "200", set_eval_int, irc );  	s->old_key = g_strdup( "buddy_sendbuffer_delay" );  	s = set_add( &b->set, "password", NULL, set_eval_password, irc ); -	s->flags |= SET_NULL_OK; +	s->flags |= SET_NULL_OK | SET_PASSWORD;  	s = set_add( &b->set, "private", "true", set_eval_bool, irc );  	s = set_add( &b->set, "query_order", "lifo", NULL, irc );  	s = set_add( &b->set, "root_nick", ROOT_NICK, set_eval_root_nick, irc ); diff --git a/protocols/account.c b/protocols/account.c index de5f9bd4..12831531 100644 --- a/protocols/account.c +++ b/protocols/account.c @@ -63,7 +63,7 @@ account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass )  	s->flags |= ACC_SET_NOSAVE; /* Just for bw compatibility! */  	s = set_add( &a->set, "password", NULL, set_eval_account, a ); -	s->flags |= ACC_SET_NOSAVE | SET_NULL_OK; +	s->flags |= ACC_SET_NOSAVE | SET_NULL_OK | SET_PASSWORD;  	s = set_add( &a->set, "tag", NULL, set_eval_account, a );  	s->flags |= ACC_SET_NOSAVE; diff --git a/root_commands.c b/root_commands.c index 81e33076..db29d088 100644 --- a/root_commands.c +++ b/root_commands.c @@ -273,17 +273,20 @@ static void cmd_save( irc_t *irc, char **cmd )  static void cmd_showset( irc_t *irc, set_t **head, char *key )  { +	set_t *set;  	char *val;  	if( ( val = set_getstr( head, key ) ) )  		irc_usermsg( irc, "%s = `%s'", key, val ); -	else if( !set_find( head, key ) ) +	else if( !( set = set_find( head, key ) ) )  	{  		irc_usermsg( irc, "Setting `%s' does not exist.", key );  		if( *head == irc->b->set )  			irc_usermsg( irc, "It might be an account or channel setting. "  			             "See \x02help account set\x02 and \x02help channel set\x02." );  	} +	else if( set->flags & SET_PASSWORD ) +		irc_usermsg( irc, "%s = `********' (hidden)", key );  	else  		irc_usermsg( irc, "%s is empty", key );  } @@ -47,6 +47,7 @@ typedef enum  	SET_NOSAVE = 0x0001,  	SET_NULL_OK = 0x0100,  	SET_HIDDEN = 0x0200, +	SET_PASSWORD = 0x0400,  } set_flags_t;  typedef struct set | 
