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:
parent
fd7fd23050
commit
eb830e11b7
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue
Block a user