aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/mod
diff options
context:
space:
mode:
authorOpSimple <35542206+OpSimple@users.noreply.github.com>2018-06-01 00:09:12 +0200
committerGitHub <noreply@github.com>2018-06-01 00:09:12 +0200
commitfd7fd230502a3289bd987f2f4e614f2ad8211016 (patch)
tree4f91093a125c85abcf1e3a6862b5531b045cf9f9 /server/src/commands/mod
parentUpdate DOCUMENTATION.md (diff)
downloadhackchat-fd7fd230502a3289bd987f2f4e614f2ad8211016.tar.gz
hackchat-fd7fd230502a3289bd987f2f4e614f2ad8211016.zip
Added an extra option to add allies
Added an extra option to add allies who can see the dumb user's texts
Diffstat (limited to 'server/src/commands/mod')
-rw-r--r--server/src/commands/mod/dumb.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/src/commands/mod/dumb.js b/server/src/commands/mod/dumb.js
index 19d9b68..de0fe11 100644
--- a/server/src/commands/mod/dumb.js
+++ b/server/src/commands/mod/dumb.js
@@ -40,7 +40,13 @@ exports.run = async (core, server, socket, data) => {
return;
}
- core.muzzledHashes[badClient.hash] = true;
+ let record = core.muzzledHashes[badClient.hash] = {
+ dumb:true
+ }
+
+ if(data.allies && data.allies.constructor === Array){
+ record.allies = data.allies;
+ }
server.broadcast({
cmd: 'info',
@@ -53,6 +59,6 @@ exports.requiredData = ['nick'];
exports.info = {
name: 'dumb',
- usage: 'dumb {nick}',
+ usage: 'dumb {nick} [allies...]',
description: 'Cleanly disable a user messages and make him dumb'
};