More indentation

This commit is contained in:
Kasper Rynning-Tønnesen
2017-09-22 11:45:54 +02:00
parent 68d243c93a
commit 9372bf3bf0
14 changed files with 2241 additions and 2265 deletions

View File

@@ -82,14 +82,12 @@ function decrypt_string(socket_id, pw){
var decrypted = CryptoJS.enc.Utf8.stringify( var decrypted = CryptoJS.enc.Utf8.stringify(
CryptoJS.AES.decrypt({ CryptoJS.AES.decrypt({
ciphertext: encrypted ciphertext: encrypted
}, }, key, {
key,
// edit: changed to Pkcs5
{
mode: CryptoJS.mode.CBC, mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7, padding: CryptoJS.pad.Pkcs7,
iv: iv, iv: iv,
})); })
);
return decrypted; return decrypted;
} catch(e) { } catch(e) {
return ""; return "";

View File

@@ -33,13 +33,7 @@ module.exports = function() {
db.collection("frontpage_lists").update({"_id": channel}, {$inc: {viewers: 1}}, {upsert: true}, function(){}); db.collection("frontpage_lists").update({"_id": channel}, {$inc: {viewers: 1}}, {upsert: true}, function(){});
}); });
} }
/*if(name != "") {
db.collection("user_names").update({"_id": "all_names"}, {$addToSet: {names: name}}, {upsert: true}, function(err, updated) {
if(updated.nModified == 1) {
db.collection("user_names").update({"guid": guid}, {$set: {name: name}}, {upsert:true}, function(err, update){});
}
});
}*/
db.collection("connected_users").update({"_id": "total_users"}, {$inc: {total_users: 1}}, {upsert: true}, function(err, docs){}); db.collection("connected_users").update({"_id": "total_users"}, {$inc: {total_users: 1}}, {upsert: true}, function(err, docs){});
}); });
@@ -122,22 +116,6 @@ module.exports = function() {
} }
}); });
/*socket.on('namechange', function(msg)
{
if(coll == undefined) {
coll = msg.channel;
}
Chat.namechange(msg.name, guid, coll, function(new_name) {
name = new_name;
});
});
socket.on('removename', function()
{
Chat.removename(guid, coll);
name = "";
});*/
socket.on('chat', function (msg) { socket.on('chat', function (msg) {
Chat.chat(msg, guid, offline, socket); Chat.chat(msg, guid, offline, socket);
}); });