mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +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(
|
||||
CryptoJS.AES.decrypt({
|
||||
ciphertext: encrypted
|
||||
},
|
||||
key,
|
||||
// edit: changed to Pkcs5
|
||||
{
|
||||
}, key, {
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7,
|
||||
iv: iv,
|
||||
}));
|
||||
})
|
||||
);
|
||||
return decrypted;
|
||||
} catch(e) {
|
||||
return "";
|
||||
|
||||
@@ -33,13 +33,7 @@ module.exports = 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){});
|
||||
});
|
||||
|
||||
@@ -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) {
|
||||
Chat.chat(msg, guid, offline, socket);
|
||||
});
|
||||
|
||||
@@ -68,9 +68,9 @@ var Chat = {
|
||||
}
|
||||
data.value = "";
|
||||
return;
|
||||
},
|
||||
},
|
||||
|
||||
allchat: function(inp) {
|
||||
allchat: function(inp) {
|
||||
if(inp.msg.substring(0,1) == ":" && !chat_active) {
|
||||
Chat.all_received += 1;
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
@@ -102,9 +102,9 @@ var Chat = {
|
||||
var in_text = document.createTextNode(inp.msg);
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;
|
||||
},
|
||||
},
|
||||
|
||||
channelchat: function(data) {
|
||||
channelchat: function(data) {
|
||||
if(data.msg.substring(0,1) == ":" && !chat_active) {
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
@@ -134,9 +134,9 @@ var Chat = {
|
||||
var in_text = document.createTextNode(data.msg);
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight;
|
||||
},
|
||||
},
|
||||
|
||||
chat_blink: function() {
|
||||
chat_blink: function() {
|
||||
blinking = true;
|
||||
$(".chat-link").attr("style", "color: grey !important;");
|
||||
setTimeout(function () {
|
||||
@@ -145,5 +145,5 @@ var Chat = {
|
||||
if(blinking) Chat.chat_blink();
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user