update report slow

This commit is contained in:
reality 2013-07-06 18:47:47 +00:00
parent c5448080bf
commit 7e1818d875

View File

@ -13,9 +13,15 @@ var report = function(dbot) {
}
}, this);
_.each(ops, function(user) {
dbot.say(server, user.name, message);
}, this);
var i = 0;
var notifyChannel = function(ops) {
if(i >= ops.length) return;
dbot.say(server, ops[i].name, message);
setTimeout(function() {
i++; notifyChannel(ops);
}, 1000);
};
notifyChannel(ops);
}
};