aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc.c2
-rw-r--r--protocols/account.c2
-rw-r--r--root_commands.c5
-rw-r--r--set.h1
4 files changed, 7 insertions, 3 deletions
diff --git a/irc.c b/irc.c
index ed2363ae..56adc12b 100644
--- a/irc.c
+++ b/irc.c
@@ -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 );
}
diff --git a/set.h b/set.h
index 2a8400dd..8f3028c4 100644
--- a/set.h
+++ b/set.h
@@ -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