diff options
author | OpSimple <35542206+OpSimple@users.noreply.github.com> | 2018-06-01 20:15:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 20:15:38 +0200 |
commit | a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc (patch) | |
tree | 3c186c787951ce5f020837f225b1ec4d6596c667 /server/src/commands/core | |
parent | Just cleaning stuffs (diff) | |
download | hackchat-a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc.tar.gz hackchat-a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc.zip |
Solved uneeded variable creation
Diffstat (limited to 'server/src/commands/core')
-rw-r--r-- | server/src/commands/core/chat.js | 5 |
1 files changed, 1 insertions, 4 deletions
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 |