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

Added an extra loop for allies

Added an extra loop so as to deliver the muzzled user's texts to all of the allies
This commit is contained in:
OpSimple 2018-06-01 03:42:25 +05:30 committed by GitHub
parent fd7fd23050
commit eb830e11b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,12 @@ exports.run = async (core, server, socket, data) => {
if(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] });
}
}
} else {
//else send it to everyone
server.broadcast( payload, { channel: socket.channel});