diff options
| author | 2018-10-05 09:46:03 +0100 | |
|---|---|---|
| committer | 2018-10-05 09:46:03 +0100 | |
| commit | 808694c113e3edeec910be3562e1cf9610066f08 (patch) | |
| tree | 3b23fbcdd78a0b6247a523e34938c0d533e74175 /modules/stats.py | |
| parent | Remove prints (diff) | |
| signature | ||
Return more info for api.servers and api.channels
Diffstat (limited to 'modules/stats.py')
| -rw-r--r-- | modules/stats.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/stats.py b/modules/stats.py index ea9e5a62..e7158dd0 100644 --- a/modules/stats.py +++ b/modules/stats.py @@ -56,14 +56,19 @@ class Module(ModuleManager.BaseModule): "hostname": server.target_hostname, "port": server.port, "tls": server.tls, - "alias": server.alias + "alias": server.alias, + "hostmask": "%s!%s@%s" % ( + server.nickname, server.username, server.hostname), + "users": len(server.users) } return servers def _channel_stats(self, channel): return { "users": len(channel.users), - "topic": channel.topic + "topic": channel.topic, + "topic-set-at": channel.topic_time, + "topic-set-by": channel.topic_setter_nickname } @utils.hook("api.channels") def channels_api(self, event): |
