Add channel stats to /api/servers

This commit is contained in:
jesopo 2018-11-27 13:23:20 +00:00
parent 8bbdcc6d4e
commit ab60012cbe

View file

@ -58,7 +58,8 @@ class Module(ModuleManager.BaseModule):
server.nickname, server.username, server.hostname),
"users": len(server.users),
"bytes-written": server.bytes_written,
"bytes-read": server.bytes_read
"bytes-read": server.bytes_read,
"channels": [self._channel_stats(c) for c in server.channels]
}
@utils.hook("api.get.servers")