From 3021601c528de0744a595dc643d2c3c21cf958a1 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 27 Jun 2013 15:26:21 +0000 Subject: [PATCH] fix quotes --- modules/quotes/quotes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/quotes/quotes.js b/modules/quotes/quotes.js index ffa5372..4f3e86c 100644 --- a/modules/quotes/quotes.js +++ b/modules/quotes/quotes.js @@ -35,7 +35,7 @@ var quotes = function(dbot) { 'cleanRef': function(key) { key = key.toLowerCase(); - while(key.endsWith("_")) { + while(key.slice(-1) == '_') { key = key.substring(0, key.length-1); } return key; @@ -53,7 +53,7 @@ var quotes = function(dbot) { }); clearTimeout(this.rmTimer); - if(this.rmCache.length < dbot.config.quotes.rmLimit) { + if(this.rmCache.length < this.config.rmLimit) { this.rmTimer = setTimeout(function() { this.rmCache.length = 0; // lol what }.bind(this), 600000);