mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
Quotes rm stuff no longer uses timers.js [#170]
This commit is contained in:
parent
d3c3c2a5c1
commit
aeea3fc269
@ -44,7 +44,7 @@ var quotes = function(dbot) {
|
|||||||
|
|
||||||
'resetRemoveTimer': function(event, key, quote) {
|
'resetRemoveTimer': function(event, key, quote) {
|
||||||
this.rmAllowed = false;
|
this.rmAllowed = false;
|
||||||
dbot.timers.addOnceTimer(5000, function() {
|
setTimeout(5000, function() {
|
||||||
this.rmAllowed = true;
|
this.rmAllowed = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -52,10 +52,10 @@ var quotes = function(dbot) {
|
|||||||
'key': key,
|
'key': key,
|
||||||
'quote': quote
|
'quote': quote
|
||||||
});
|
});
|
||||||
dbot.timers.clearTimeout(this.rmTimer);
|
|
||||||
|
|
||||||
|
clearTimeout(this.rmTimer);
|
||||||
if(this.rmCache.length < dbot.config.quotes.rmLimit) {
|
if(this.rmCache.length < dbot.config.quotes.rmLimit) {
|
||||||
this.rmTimer = dbot.timers.addOnceTimer(600000, function() {
|
this.rmTimer = setTimeout(600000, function() {
|
||||||
this.rmCache.length = 0; // lol what
|
this.rmCache.length = 0; // lol what
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user