mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
More indentation
This commit is contained in:
@@ -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 "";
|
||||||
|
|||||||
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user