aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpSimple <35542206+OpSimple@users.noreply.github.com>2018-06-01 20:15:38 +0200
committerGitHub <noreply@github.com>2018-06-01 20:15:38 +0200
commita9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc (patch)
tree3c186c787951ce5f020837f225b1ec4d6596c667
parentJust cleaning stuffs (diff)
downloadhackchat-a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc.tar.gz
hackchat-a9b020fa02e41a9ac5e59428d0ac4e1f6b6555fc.zip
Solved uneeded variable creation
-rw-r--r--server/src/commands/core/chat.js5
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