From 808694c113e3edeec910be3562e1cf9610066f08 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 5 Oct 2018 09:46:03 +0100 Subject: [PATCH] Return more info for api.servers and api.channels --- modules/stats.py | 9 +++++++-- 1 file 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):