diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kike.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -414,12 +414,14 @@ channel_get_mode (struct channel *self, bool disclose_secrets) if (self->user_limit != -1) str_append_c (&mode, 'l'); if (self->key) str_append_c (&mode, 'k'); - if (self->user_limit != -1) - str_append_printf (&mode, " %ld", self->user_limit); - - // XXX: is this correct? Try it on an existing implementation. - if (self->key && disclose_secrets) - str_append_printf (&mode, " %s", self->key); + // XXX: is it correct to split it? Try it on an existing implementation. + if (disclose_secrets) + { + if (self->user_limit != -1) + str_append_printf (&mode, " %ld", self->user_limit); + if (self->key) + str_append_printf (&mode, " %s", self->key); + } return str_steal (&mode); } |