kike: channel user limit is also secret
This commit is contained in:
parent
a7ba1eb15f
commit
4b3af280fa
14
src/kike.c
14
src/kike.c
|
@ -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->user_limit != -1) str_append_c (&mode, 'l');
|
||||||
if (self->key) str_append_c (&mode, 'k');
|
if (self->key) str_append_c (&mode, 'k');
|
||||||
|
|
||||||
if (self->user_limit != -1)
|
// XXX: is it correct to split it? Try it on an existing implementation.
|
||||||
str_append_printf (&mode, " %ld", self->user_limit);
|
if (disclose_secrets)
|
||||||
|
{
|
||||||
// XXX: is this correct? Try it on an existing implementation.
|
if (self->user_limit != -1)
|
||||||
if (self->key && disclose_secrets)
|
str_append_printf (&mode, " %ld", self->user_limit);
|
||||||
str_append_printf (&mode, " %s", self->key);
|
if (self->key)
|
||||||
|
str_append_printf (&mode, " %s", self->key);
|
||||||
|
}
|
||||||
return str_steal (&mode);
|
return str_steal (&mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue