From baeeee64d9a0da8b843b84625f6a0eec5496e674 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 19 Feb 2015 17:14:27 +0000 Subject: [PATCH] no karma from bot (quote abuse) --- modules/karma/karma.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/karma/karma.js b/modules/karma/karma.js index e72bb17..80665d3 100644 --- a/modules/karma/karma.js +++ b/modules/karma/karma.js @@ -98,7 +98,7 @@ var karma = function(dbot) { this.listener = function(event) { var match = event.message.match(/^(.+)(\+\+|\-\-)$/); - if(match && match[1].length < 25) { + if(event.user !== dbot.config.name && match && match[1].length < 25) { match[1] = match[1].replace(/(\+|\-)/g,'').replace(/:/g,'').trim(); if(_.has(this.lastKarma, event.rUser.id) && this.lastKarma[event.rUser.id] + 5000 > Date.now()) { return event.reply('Try again in a few seconds : - )');