3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

offlineReporting configurable

This commit is contained in:
reality 2016-01-28 17:36:19 +00:00
parent 3af2cbb678
commit ac9488bad9
3 changed files with 4 additions and 2 deletions

View File

@ -70,6 +70,7 @@ console.log('removing ' + uPart);
});
}, function() {
// Queue notifies for offline ops
if(this.config.offlineReporting == true) {
if(!_.include(this.config.noMissingChans, cName)) {
_.each(offlineOps, function(op) {
if(!this.pending[op.id]) this.pending[op.id] = [];
@ -82,6 +83,7 @@ console.log('removing ' + uPart);
this.pNotify[op.id] = true;
}, this);
}
}
// Send notifies to online ops
ops = _.difference(ops, _.keys(offlineOps));

View File

@ -26,5 +26,6 @@
"host_lookup": [
"#chan"
],
"noMissingChans": []
"noMissingChans": [],
"offlineReporting": false
}

View File

@ -10,7 +10,6 @@ var report = function(dbot) {
this.internalAPI = {
'notify': function(server, users, message) {
async.eachSeries(users, function(nick, next) {
console.log('sending msg to ' + nick);
setTimeout(function() {
dbot.say(server, nick, message);
next();