From da9cbe3dbb799b7b668c895367c7d3778f1d0e16 Mon Sep 17 00:00:00 2001 From: marzavec Date: Fri, 6 Mar 2020 11:00:30 -0600 Subject: Minor UAC tweaks Added an underscore to the uac info lib which prevents the server from attempting to use the file as a command module, allowing removal of the 'info' property and empty 'run' command --- server/src/commands/mod/kick.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/src/commands/mod/kick.js') diff --git a/server/src/commands/mod/kick.js b/server/src/commands/mod/kick.js index 0a94c6d..ec5696b 100644 --- a/server/src/commands/mod/kick.js +++ b/server/src/commands/mod/kick.js @@ -2,7 +2,7 @@ Description: Forces a change on the target(s) socket's channel, then broadcasts event */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket, data) { @@ -54,17 +54,17 @@ export async function run(core, server, socket, data) { // Announce the kicked clients arrival in destChannel and that they were kicked // Before they arrive, so they don't see they got moved - for (let i = 0; i < kicked.length; i++) { + for (let i = 0; i < kicked.length; i += 1) { server.broadcast({ cmd: 'onlineAdd', nick: kicked[i].nick, trip: kicked[i].trip || 'null', - hash: kicked[i].userHash + hash: kicked[i].userHash, }, { channel: destChannel }); } // Move all kicked clients to the new channel - for (let i = 0; i < kicked.length; i++) { + for (let i = 0; i < kicked.length; i += 1) { kicked[i].channel = destChannel; server.broadcast({ @@ -87,7 +87,7 @@ export async function run(core, server, socket, data) { // publicly broadcast kick event server.broadcast({ cmd: 'info', - text: `Kicked ${kicked.map(k => k.nick).join(', ')}`, + text: `Kicked ${kicked.map((k) => k.nick).join(', ')}`, }, { channel: socket.channel, level: (level) => level < UAC.levels.moderator }); // stats are fun -- cgit v1.2.1