3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

concurrise the imgur pulls

This commit is contained in:
reality 2014-02-26 15:49:44 +00:00
parent 8c93a75e04
commit 93022fa4f2

View File

@ -304,7 +304,7 @@ var imgur = function(dbot) {
dbot.api.link.addHandler('imgurimage', /https?:\/\/i\.imgur\.com\/([a-zA-Z0-9]+)\.([jpg|png|gif])/, imgurHandler); dbot.api.link.addHandler('imgurimage', /https?:\/\/i\.imgur\.com\/([a-zA-Z0-9]+)\.([jpg|png|gif])/, imgurHandler);
dbot.api.link.addHandler('imgurimage', /https?:\/\/imgur\.com\/([a-zA-Z0-9]+)/, imgurHandler); dbot.api.link.addHandler('imgurimage', /https?:\/\/imgur\.com\/([a-zA-Z0-9]+)/, imgurHandler);
async.timesSeries(this.config.ricachelength, function(n, next) { async.times(this.config.ricachelength, function(n, next) {
this.api.getGoodRandomImage(function(link, imgData) { this.api.getGoodRandomImage(function(link, imgData) {
this.riCache.push([ link, imgData ]); this.riCache.push([ link, imgData ]);
next(); next();