From 318a924b6d725533449ebf0ff07cf55faeffd73d Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 29 Oct 2014 15:07:57 -0500 Subject: [PATCH] Extend blacklist to PMs --- lib/channel/chat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/channel/chat.js b/lib/channel/chat.js index 57f839e0..5cfa0c1c 100644 --- a/lib/channel/chat.js +++ b/lib/channel/chat.js @@ -162,6 +162,15 @@ ChatModule.prototype.handlePm = function (user, data) { }); } + if (data.msg.match(Config.get("link-domain-blacklist-regex"))) { + this.channel.logger.log(user.displayip + " (" + user.getName() + ") was kicked for " + + "blacklisted domain"); + user.kick(); + this.sendModMessage(user.getName() + " was kicked: blacklisted domain in " + + "private message", 2); + return; + } + var reallyTo = data.to; data.to = data.to.toLowerCase();