mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Prettier JSON and less globally exposed variables
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
var Functions = require(pathThumbnails + '/handlers/functions.js');
|
||||
var crypto = require('crypto');
|
||||
var Filter = require('bad-words');
|
||||
var filter = new Filter({ placeHolder: 'x'});
|
||||
var db = require(pathThumbnails + '/handlers/db.js');
|
||||
|
||||
function password(inp, coll, guid, offline, socket) {
|
||||
var sessionId = Functions.getSession(socket);
|
||||
if(sessionId == "") sessionId = "empty";
|
||||
@@ -22,9 +28,9 @@ function password(inp, coll, guid, offline, socket) {
|
||||
try {
|
||||
coll = inp.channel;
|
||||
if(coll.length == 0) return;
|
||||
coll = emojiStrip(coll).toLowerCase();
|
||||
coll = Functions.removeEmojis(coll).toLowerCase();
|
||||
coll = coll.replace(/_/g, "");
|
||||
|
||||
|
||||
coll = filter.clean(coll);
|
||||
} catch(e) {
|
||||
return;
|
||||
@@ -86,9 +92,9 @@ function conf_function(params, coll, guid, offline, socket) {
|
||||
try {
|
||||
coll = params.channel.replace(/ /g,'');
|
||||
if(coll.length == 0) return;
|
||||
coll = emojiStrip(coll).toLowerCase();
|
||||
coll = Functions.removeEmojis(coll).toLowerCase();
|
||||
coll = coll.replace(/_/g, "");
|
||||
|
||||
|
||||
coll = filter.clean(coll);
|
||||
} catch(e) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user