3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-02 17:09:29 +01:00

fix quotes

This commit is contained in:
reality 2013-06-27 15:26:21 +00:00
parent 4ffff09381
commit 3021601c52

View File

@ -35,7 +35,7 @@ var quotes = function(dbot) {
'cleanRef': function(key) { 'cleanRef': function(key) {
key = key.toLowerCase(); key = key.toLowerCase();
while(key.endsWith("_")) { while(key.slice(-1) == '_') {
key = key.substring(0, key.length-1); key = key.substring(0, key.length-1);
} }
return key; return key;
@ -53,7 +53,7 @@ var quotes = function(dbot) {
}); });
clearTimeout(this.rmTimer); clearTimeout(this.rmTimer);
if(this.rmCache.length < dbot.config.quotes.rmLimit) { if(this.rmCache.length < this.config.rmLimit) {
this.rmTimer = setTimeout(function() { this.rmTimer = setTimeout(function() {
this.rmCache.length = 0; // lol what this.rmCache.length = 0; // lol what
}.bind(this), 600000); }.bind(this), 600000);