Skip to content

Commit

Permalink
Add a destination for the message
Browse files Browse the repository at this point in the history
  • Loading branch information
kenany committed Dec 17, 2013
1 parent 83b0878 commit 2f1d91d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ module.exports = function(NwitchPlugin) {

client.addListener('message', function(from, to, message) {
if (message.length > 5 && capsRate(message) >= 0.55) {
client.say('.timeout ' + from + ' 2');
var destination = to.charAt(0) === '#' ? to : from;
client.say(destination, '.timeout ' + from + ' 2');
client.say(destination, 'STOP SCREAMING ' + from + '!');
}
});
}
Expand Down

0 comments on commit 2f1d91d

Please sign in to comment.