From e7bc722f096562914f54da2e1f8a0f3614763c1d Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 31 Aug 2008 01:04:53 +0100 Subject: Integrated cmd_set() and the "account set" into one fully unreadable cmd_set_real() function and using this to get a proper "chat set" command. --- chat.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chat.c') diff --git a/chat.c b/chat.c index 8c201216..41de1401 100644 --- a/chat.c +++ b/chat.c @@ -28,6 +28,7 @@ struct chat *chat_add( irc_t *irc, account_t *acc, char *handle, char *channel ) { struct chat *c, *l; + set_t *s; if( !chat_chanok( channel ) ) return NULL; @@ -52,9 +53,10 @@ struct chat *chat_add( irc_t *irc, account_t *acc, char *handle, char *channel ) c->handle = g_strdup( handle ); c->channel = g_strdup( channel ); - set_add( &c->set, "auto_join", "false", set_eval_bool, c ); - set_add( &c->set, "auto_rejoin", "false", set_eval_bool, c ); - set_add( &c->set, "nick", NULL, NULL, c ); + s = set_add( &c->set, "auto_join", "false", set_eval_bool, c ); + s = set_add( &c->set, "auto_rejoin", "false", set_eval_bool, c ); + s = set_add( &c->set, "nick", NULL, NULL, c ); + s->flags |= SET_NULL_OK; return c; } -- cgit v1.2.3