aboutsummaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/commands/core/chat.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/commands/core/chat.js b/server/src/commands/core/chat.js
index bce6adb..86f69c3 100644
--- a/server/src/commands/core/chat.js
+++ b/server/src/commands/core/chat.js
@@ -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'
-}; \ No newline at end of file
+};