mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Added checking for muzzled user
This commit is contained in:
parent
bf2d064679
commit
60246bc2fb
@ -48,7 +48,12 @@ exports.run = async (core, server, socket, data) => {
|
||||
payload.trip = socket.trip;
|
||||
}
|
||||
|
||||
server.broadcast( payload, { channel: socket.channel });
|
||||
if(core.muzzledHashes[socket.hash]){
|
||||
server.broadcast( payload, { channel: socket.channel, hash: socket.hash });
|
||||
} else {
|
||||
//else send it to everyone
|
||||
server.broadcast( payload, { channel: socket.channel});
|
||||
}
|
||||
|
||||
core.managers.stats.increment('messages-sent');
|
||||
};
|
||||
@ -59,4 +64,4 @@ exports.info = {
|
||||
name: 'chat',
|
||||
usage: 'chat {text}',
|
||||
description: 'Broadcasts passed `text` field to the calling users channel'
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user