Enable link fetcher
This commit is contained in:
parent
356851c3f2
commit
82e192cd2c
@ -9,7 +9,7 @@ process.setMaxListeners(0);
|
|||||||
|
|
||||||
module.exports = function(irc, network) {
|
module.exports = function(irc, network) {
|
||||||
var client = this;
|
var client = this;
|
||||||
irc.on("message", function(data) {
|
irc.on("privmsg", function(data) {
|
||||||
var config = Helper.getConfig();
|
var config = Helper.getConfig();
|
||||||
if (!config.prefetch) {
|
if (!config.prefetch) {
|
||||||
return;
|
return;
|
||||||
@ -27,8 +27,7 @@ module.exports = function(irc, network) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = data.to.toLowerCase() === irc.user.nick.toLowerCase();
|
var chan = _.find(network.channels, {name: data.target});
|
||||||
var chan = _.find(network.channels, {name: self ? data.from : data.to});
|
|
||||||
if (typeof chan === "undefined") {
|
if (typeof chan === "undefined") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user