Add to JSON logging output, for users: "idle_since".

Suggested by westor in https://bugs.unrealircd.org/view.php?id=6083

For technical reasons this field is only available for local users.
This commit is contained in:
Bram Matthys 2022-05-23 11:53:32 +02:00
parent af8418fb3e
commit 7280ffdc57
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98

View file

@ -564,6 +564,9 @@ void json_expand_client(json_t *j, const char *key, Client *client, int detail)
if (client->local && client->local->creationtime)
json_object_set_new(child, "connected_since", json_timestamp(client->local->creationtime));
if (client->local && client->local->idle_since)
json_object_set_new(child, "idle_since", json_timestamp(client->local->idle_since));
if (client->user)
{
char buf[512];