3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

chan_redirs in report [close #591]

This commit is contained in:
reality 2013-10-13 00:29:34 +00:00
parent 56616d6bdf
commit 110f23ca2f
2 changed files with 6 additions and 0 deletions

View File

@ -17,5 +17,8 @@
"type": "" "type": ""
} }
}, },
"chan_redirs": {
"#chan": "#chan-notify"
},
"noMissingChans": [] "noMissingChans": []
} }

View File

@ -101,6 +101,9 @@ var report = function(dbot) {
message = this.internalAPI.formatNotify(type, server, message = this.internalAPI.formatNotify(type, server,
user, cName, message); user, cName, message);
this.internalAPI.notify(server, _.pluck(ops, 'name'), message); this.internalAPI.notify(server, _.pluck(ops, 'name'), message);
if(_.has(this.config.chan_redirs, cName)) {
dbot.say(server, this.config.chan_redirs[cName], message);
}
}.bind(this)); }.bind(this));
} }
}.bind(this)); }.bind(this));