Extend blacklist to PMs

This commit is contained in:
calzoneman 2014-10-29 15:07:57 -05:00
parent 575b762ba1
commit 318a924b6d
1 changed files with 9 additions and 0 deletions

View File

@ -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; var reallyTo = data.to;
data.to = data.to.toLowerCase(); data.to = data.to.toLowerCase();