forked from GitHub/dbot
offlineReporting configurable
This commit is contained in:
parent
3af2cbb678
commit
ac9488bad9
@ -70,6 +70,7 @@ console.log('removing ' + uPart);
|
|||||||
});
|
});
|
||||||
}, function() {
|
}, function() {
|
||||||
// Queue notifies for offline ops
|
// Queue notifies for offline ops
|
||||||
|
if(this.config.offlineReporting == true) {
|
||||||
if(!_.include(this.config.noMissingChans, cName)) {
|
if(!_.include(this.config.noMissingChans, cName)) {
|
||||||
_.each(offlineOps, function(op) {
|
_.each(offlineOps, function(op) {
|
||||||
if(!this.pending[op.id]) this.pending[op.id] = [];
|
if(!this.pending[op.id]) this.pending[op.id] = [];
|
||||||
@ -82,6 +83,7 @@ console.log('removing ' + uPart);
|
|||||||
this.pNotify[op.id] = true;
|
this.pNotify[op.id] = true;
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Send notifies to online ops
|
// Send notifies to online ops
|
||||||
ops = _.difference(ops, _.keys(offlineOps));
|
ops = _.difference(ops, _.keys(offlineOps));
|
||||||
|
@ -26,5 +26,6 @@
|
|||||||
"host_lookup": [
|
"host_lookup": [
|
||||||
"#chan"
|
"#chan"
|
||||||
],
|
],
|
||||||
"noMissingChans": []
|
"noMissingChans": [],
|
||||||
|
"offlineReporting": false
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ var report = function(dbot) {
|
|||||||
this.internalAPI = {
|
this.internalAPI = {
|
||||||
'notify': function(server, users, message) {
|
'notify': function(server, users, message) {
|
||||||
async.eachSeries(users, function(nick, next) {
|
async.eachSeries(users, function(nick, next) {
|
||||||
console.log('sending msg to ' + nick);
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
dbot.say(server, nick, message);
|
dbot.say(server, nick, message);
|
||||||
next();
|
next();
|
||||||
|
Loading…
Reference in New Issue
Block a user