From fc81fc38a1586cd7c3521e23d539a3132971b2bf Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 5 Feb 2015 19:49:38 +0000 Subject: [PATCH] trim space from end of karma --- 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 fddc667..77e10e1 100644 --- a/modules/karma/karma.js +++ b/modules/karma/karma.js @@ -99,7 +99,7 @@ var karma = function(dbot) { this.listener = function(event) { var match = event.message.match(/^(.+)(\+\+|\-\-)$/); if(match) { - match[1] = match[1].replace(/(\+|\-)/g,''); + match[1] = match[1].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 : - )'); } else if(event.rUser.currentNick.toLowerCase === match[1].toLowerCase() || event.rUser.primaryNick.toLowerCase() === match[1].toLowerCase()) {