From 85b9ad08bb49f660949131a8399c6543bb4e98bc Mon Sep 17 00:00:00 2001 From: marzavec Date: Fri, 6 Nov 2020 14:12:36 -0800 Subject: [PATCH] Bug fix --- server/src/commands/mod/kick.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/server/src/commands/mod/kick.js b/server/src/commands/mod/kick.js index c476e57..183c05f 100644 --- a/server/src/commands/mod/kick.js +++ b/server/src/commands/mod/kick.js @@ -80,15 +80,14 @@ export async function run({ // Announce the kicked clients arrival in destChannel and that they were kicked // Before they arrive, so they don't see they got moved - const moveAnnouncement = { - ...getUserDetails(socket), - ...{ - cmd: 'onlineAdd', - channel: destChannel, // @todo Multichannel - }, - }; for (let i = 0; i < kicked.length; i += 1) { - server.broadcast(moveAnnouncement, { channel: destChannel }); + server.broadcast({ + ...getUserDetails(kicked[i]), + ...{ + cmd: 'onlineAdd', + channel: destChannel, // @todo Multichannel + }, + }, { channel: destChannel }); } // Move all kicked clients to the new channel