Doing it live

This commit is contained in:
calzoneman 2014-09-13 00:01:54 -05:00
parent d2027d2e5a
commit 309e5d8b46
3 changed files with 22 additions and 1 deletions

View file

@ -1,3 +1,4 @@
var Config = require("../config");
var User = require("../user");
var XSS = require("../xss");
var ChannelModule = require("./module");
@ -215,6 +216,15 @@ ChatModule.prototype.handlePm = function (user, data) {
};
ChatModule.prototype.processChatMsg = 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 " +
"chat message", 2);
return;
}
if (data.msg.indexOf("/afk") === -1) {
user.setAFK(false);
}