1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Solved uneeded variable creation

This commit is contained in:
OpSimple 2018-06-01 23:45:38 +05:30 committed by GitHub
parent 3f7a1ee2f7
commit a9b020fa02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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