Fixed issue where filter was filtering bad words someplaces, and somewhere it doesnt

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-19 12:00:44 +02:00
parent dd8aac577a
commit 9a00c426c6
5 changed files with 19 additions and 16 deletions

View File

@@ -67,6 +67,8 @@ function chat(msg, guid, offline, socket) {
return;
}
var coll = msg.channel.toLowerCase().replace(/ /g,'');
coll = emojiStrip(coll).toLowerCase();
coll = filter.clean(coll);
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass) {
if(userpass != "" || msg.pass == undefined) {
msg.pass = userpass;
@@ -118,7 +120,8 @@ function all_chat(msg, guid, offline, socket) {
}
var coll = msg.channel.toLowerCase().replace(/ /g,'');
var data = msg.data;
coll = emojiStrip(coll).toLowerCase();
coll = filter.clean(coll);
Functions.check_inlist(coll, guid, socket, offline);
if(data !== "" && data !== undefined && data !== null &&
data.length < 151 && data.replace(/\s/g, '').length){