mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 12:12:35 +01:00
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) {
|
if(this.config.firstHost) {
|
||||||
var first = message.split(' ')[0];
|
var first = message.split(' ')[0];
|
||||||
dbot.api.users.resolveUser(event.server, first, function(user) {
|
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) {
|
dbot.api.nickserv.getUserHost(event.server, first, function(host) {
|
||||||
message = message.replace(first, first + ' [' + host + ']');
|
message = message.replace(first, first + ' [' + host + ']');
|
||||||
this.api.notify('notify', event.server, event.rUser, channelName, message);
|
this.api.notify('notify', event.server, event.rUser, channelName, message);
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
"chan_redirs": {
|
"chan_redirs": {
|
||||||
"#chan": "#chan-notify"
|
"#chan": "#chan-notify"
|
||||||
},
|
},
|
||||||
|
"host_lookup": [
|
||||||
|
"#chan"
|
||||||
|
],
|
||||||
"noMissingChans": []
|
"noMissingChans": []
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user