From 2bb5ced363b692a5696b176bc317fe525c0c05df Mon Sep 17 00:00:00 2001 From: Neel Kamath Date: Sun, 13 May 2018 16:09:55 +0530 Subject: Flatten --- server/src/commands/core/stats.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 server/src/commands/core/stats.js (limited to 'server/src/commands/core/stats.js') diff --git a/server/src/commands/core/stats.js b/server/src/commands/core/stats.js deleted file mode 100644 index b9dc002..0000000 --- a/server/src/commands/core/stats.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - Description: Legacy stats output, kept for compatibility, outputs user and channel count -*/ - -exports.run = async (core, server, socket, data) => { - let ips = {}; - let channels = {}; - for (let client of server.clients) { - if (client.channel) { - channels[client.channel] = true; - ips[client.remoteAddress] = true; - } - } - - let uniqueClientCount = Object.keys(ips).length; - let uniqueChannels = Object.keys(channels).length; - - ips = null; - channels = null; - - server.reply({ - cmd: 'info', - text: `${uniqueClientCount} unique IPs in ${uniqueChannels} channels` - }, socket); - - core.managers.stats.increment('stats-requested'); -}; - -exports.info = { - name: 'stats', - description: 'Sends back legacy server stats to the calling client' -}; \ No newline at end of file -- cgit v1.2.1