aboutsummaryrefslogtreecommitdiff
path: root/modules/stats.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-27 13:24:38 +0000
committerGravatar jesopo2018-11-27 13:24:38 +0000
commit7df55305ca0ba1b89c9ba7ce76a28d95dd02c572 (patch)
treedbfb217c2884968afbb1b0bf0eb3b6b91a441f05 /modules/stats.py
parentAdd channel stats to /api/servers (diff)
signature
Make channel stats in /api/servers a dictionary
Diffstat (limited to 'modules/stats.py')
-rw-r--r--modules/stats.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/stats.py b/modules/stats.py
index 279e6593..a5e8bea9 100644
--- a/modules/stats.py
+++ b/modules/stats.py
@@ -59,7 +59,8 @@ class Module(ModuleManager.BaseModule):
"users": len(server.users),
"bytes-written": server.bytes_written,
"bytes-read": server.bytes_read,
- "channels": [self._channel_stats(c) for c in server.channels]
+ "channels": {
+ c.name: self._channel_stats(c) for c in server.channels}
}
@utils.hook("api.get.servers")