From 5df65bd866aad7dd7d7b62d7a7ef168a26b002e5 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 21 Nov 2010 16:14:03 +0000 Subject: Don't save the global "away" settings, leave that to the IRC /AWAY info coming from the IRC client. Also, hide it from the settings list, it doesn't belong there. --- protocols/bee.c | 4 ++-- set.h | 1 + storage_xml.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/protocols/bee.c b/protocols/bee.c index 81cb7619..5800233d 100644 --- a/protocols/bee.c +++ b/protocols/bee.c @@ -33,11 +33,11 @@ bee_t *bee_new() bee_t *b = g_new0( bee_t, 1 ); set_t *s; - s = set_add( &b->set, "away", NULL, set_eval_away_status, b ); - s->flags |= SET_NULL_OK; s = set_add( &b->set, "auto_connect", "true", set_eval_bool, b ); s = set_add( &b->set, "auto_reconnect", "true", set_eval_bool, b ); s = set_add( &b->set, "auto_reconnect_delay", "5*3<900", set_eval_account_reconnect_delay, b ); + s = set_add( &b->set, "away", NULL, set_eval_away_status, b ); + s->flags |= SET_NULL_OK | SET_HIDDEN; s = set_add( &b->set, "debug", "false", set_eval_bool, b ); s = set_add( &b->set, "mobile_is_away", "false", set_eval_bool, b ); s = set_add( &b->set, "save_on_quit", "true", set_eval_bool, b ); diff --git a/set.h b/set.h index d5be7644..2a8400dd 100644 --- a/set.h +++ b/set.h @@ -44,6 +44,7 @@ extern char *SET_INVALID; typedef enum { + SET_NOSAVE = 0x0001, SET_NULL_OK = 0x0100, SET_HIDDEN = 0x0200, } set_flags_t; diff --git a/storage_xml.c b/storage_xml.c index 5035e214..042dcaae 100644 --- a/storage_xml.c +++ b/storage_xml.c @@ -493,7 +493,7 @@ static storage_status_t xml_save( irc_t *irc, int overwrite ) g_free( pass_buf ); for( set = irc->b->set; set; set = set->next ) - if( set->value ) + if( set->value && !( set->flags & SET_NOSAVE ) ) if( !xml_printf( fd, 1, "%s\n", set->key, set->value ) ) goto write_error; -- cgit v1.2.3