Skip to content

Commit

Permalink
Update quiet.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Nov 2, 2018
1 parent 6436411 commit 32cb8e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/behaviors/quiet.js
@@ -1,10 +1,11 @@
const MemoryBehavior = require('../models/memory-behavior');

// should run only on unrecognized users
const quietAction = (botNick, username) => {
if (username.match(/\[m\]/) !== null) exempt = true; // matrix user
if ()
return `/quiet ${username}`;
} else {
if (username.match(/\[m\]/) !== null) exempt = true; // exempt matrix user
if (exempt) {
return `/quiet ${username}`;
}
};

module.exports = new MemoryBehavior('join', quietAction);

0 comments on commit 32cb8e5

Please sign in to comment.