From a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc Mon Sep 17 00:00:00 2001 From: OpSimple <35542206+OpSimple@users.noreply.github.com> Date: Fri, 1 Jun 2018 23:45:38 +0530 Subject: Solved uneeded variable creation --- server/src/commands/core/chat.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'server/src/commands') diff --git a/server/src/commands/core/chat.js b/server/src/commands/core/chat.js index 0e339ba..80241d5 100644 --- a/server/src/commands/core/chat.js +++ b/server/src/commands/core/chat.js @@ -51,10 +51,7 @@ exports.run = async (core, server, socket, data) => { if(core.muzzledHashes && core.muzzledHashes[socket.hash]){ server.broadcast( payload, { channel: socket.channel, hash: socket.hash }); if(core.muzzledHashes[socket.hash].allies){ - let aqs = core.muzzledHashes[socket.hash].allies; - for(let i=0; i < aqs.length; i++){ - server.broadcast( payload, { channel: socket.channel, nick: aqs[i] }); - } + server.broadcast( payload, { channel: socket.channel, nick: core.muzzledHashes[socket.hash].allies }); } } else { //else send it to everyone -- cgit v1.2.1