From f34ee18c301322ea02009efcc10ce86d350c68d0 Mon Sep 17 00:00:00 2001 From: marzavec Date: Thu, 7 Nov 2019 11:46:55 -0600 Subject: Minor bug fixes --- server/src/commands/core/morestats.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/commands/core/morestats.js') diff --git a/server/src/commands/core/morestats.js b/server/src/commands/core/morestats.js index 3cbf8f3..3b5ceb2 100644 --- a/server/src/commands/core/morestats.js +++ b/server/src/commands/core/morestats.js @@ -26,7 +26,7 @@ export async function run(core, server, socket) { let ips = {}; let channels = {}; // for (const client of server.clients) { - this.clients.forEach((client) => { + server.clients.forEach((client) => { if (client.channel) { channels[client.channel] = true; ips[client.address] = true; @@ -59,7 +59,7 @@ export async function run(core, server, socket) { // module hook functions export function initHooks(server) { - server.registerHook('in', 'chat', this.statsCheck, 26); + server.registerHook('in', 'chat', this.statsCheck.bind(this), 26); } // hooks chat commands checking for /stats -- cgit v1.2.1