forked from GitHub/dbot
offlineReporting configurable
This commit is contained in:
parent
3af2cbb678
commit
ac9488bad9
@ -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));
|
||||
|
@ -26,5 +26,6 @@
|
||||
"host_lookup": [
|
||||
"#chan"
|
||||
],
|
||||
"noMissingChans": []
|
||||
"noMissingChans": [],
|
||||
"offlineReporting": false
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user