mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 18:23:12 +02:00
JSON-RPC: Really show *all* channels a user in.
This because for JSON-RPC you expect all accurate data, while in contrast with JSON logging the channels are just there for convenience and only show the first X channels, since otherwise the data gets too long and gets truncated (JSON logging uses channel detail level 0).
This commit is contained in:
+2
-1
@@ -255,7 +255,8 @@ void json_expand_client(json_t *j, const char *key, Client *client, int detail)
|
||||
json_object_set_new(user, "channels", channels);
|
||||
for (m = client->user->channel; m; m = m->next)
|
||||
{
|
||||
len += json_dump_string_length(m->channel->name);
|
||||
if (detail < 1) // Limit at detail level 0, but show everything at level 1 and above
|
||||
len += json_dump_string_length(m->channel->name);
|
||||
if (len > 384)
|
||||
{
|
||||
/* Truncated */
|
||||
|
||||
Reference in New Issue
Block a user