forked from GitHub/dbot
only do notify host lookup on given channels in the config
This commit is contained in:
parent
502d9c5ae8
commit
36aab19204
@ -49,7 +49,7 @@ var commands = function(dbot) {
|
||||
if(this.config.firstHost) {
|
||||
var first = message.split(' ')[0];
|
||||
dbot.api.users.resolveUser(event.server, first, function(user) {
|
||||
if(user) {
|
||||
if(user && _.include(this.config.host_lookup, channelName)) {
|
||||
dbot.api.nickserv.getUserHost(event.server, first, function(host) {
|
||||
message = message.replace(first, first + ' [' + host + ']');
|
||||
this.api.notify('notify', event.server, event.rUser, channelName, message);
|
||||
|
@ -20,5 +20,8 @@
|
||||
"chan_redirs": {
|
||||
"#chan": "#chan-notify"
|
||||
},
|
||||
"host_lookup": [
|
||||
"#chan"
|
||||
],
|
||||
"noMissingChans": []
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user