diff options
author | marzavec <admin@marzavec.com> | 2020-03-06 18:00:30 +0100 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2020-03-06 18:00:30 +0100 |
commit | da9cbe3dbb799b7b668c895367c7d3778f1d0e16 (patch) | |
tree | 026aebaf1c24e82043c658d29afc8cc9b0bce121 /server/src/commands/mod/kick.js | |
parent | Merge pull request #89 from MinusGix/nul_initial2 (diff) | |
download | hackchat-da9cbe3dbb799b7b668c895367c7d3778f1d0e16.tar.gz hackchat-da9cbe3dbb799b7b668c895367c7d3778f1d0e16.zip |
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
Diffstat (limited to '')
-rw-r--r-- | server/src/commands/mod/kick.js | 10 |
1 files changed, 5 insertions, 5 deletions
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 |