update modules/stats.py to use connection_params

This commit is contained in:
jesopo 2018-11-11 08:47:21 +00:00
parent 8d350aa5f5
commit d72e01aa68

View file

@ -50,10 +50,10 @@ class Module(ModuleManager.BaseModule):
def _server_stats(self, server): def _server_stats(self, server):
return { return {
"hostname": server.target_hostname, "hostname": server.connection_params.hostname,
"port": server.port, "port": server.connection_params.port,
"tls": server.tls, "tls": server.connection_params.tls,
"alias": server.alias, "alias": server.connection_params.alias,
"hostmask": "%s!%s@%s" % ( "hostmask": "%s!%s@%s" % (
server.nickname, server.username, server.hostname), server.nickname, server.username, server.hostname),
"users": len(server.users), "users": len(server.users),