aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-11-21 16:14:03 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-11-21 16:14:03 +0000
commit5df65bd866aad7dd7d7b62d7a7ef168a26b002e5 (patch)
tree55d5aa36a7d490c865e9ece46f5e37f5633d2505
parent495d21b4d09392a84ff4c6fd914a0923029d2462 (diff)
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.
-rw-r--r--protocols/bee.c4
-rw-r--r--set.h1
-rw-r--r--storage_xml.c2
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, "<setting name=\"%s\">%s</setting>\n", set->key, set->value ) )
goto write_error;