aboutsummaryrefslogtreecommitdiffstats
path: root/chat.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-08-31 01:04:53 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2008-08-31 01:04:53 +0100
commite7bc722f096562914f54da2e1f8a0f3614763c1d (patch)
treeb61409a563b088da5b80358b6204b28dcb876c2a /chat.c
parent131c6b640e9921844fcf528de1a74682cfc6c768 (diff)
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.
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c8
1 files changed, 5 insertions, 3 deletions
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;
}