From fd7fd230502a3289bd987f2f4e614f2ad8211016 Mon Sep 17 00:00:00 2001
From: OpSimple <35542206+OpSimple@users.noreply.github.com>
Date: Fri, 1 Jun 2018 03:39:12 +0530
Subject: Added an extra option to add allies

Added an extra option to add allies who can see the dumb user's texts
---
 server/src/commands/mod/dumb.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'server')

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'
 };
-- 
cgit v1.2.1