mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Making guid somewhat more unique, and not using connection, but cookie instead
This commit is contained in:
@@ -31,7 +31,9 @@ module.exports = function() {
|
|||||||
socket.zoff_id = socket.id;
|
socket.zoff_id = socket.id;
|
||||||
socket.emit("get_list");
|
socket.emit("get_list");
|
||||||
|
|
||||||
var guid = Functions.hash_pass(socket.handshake.headers["user-agent"] + socket.handshake.address + socket.handshake.headers["accept-language"]);
|
var guid = socket.cookie_id;
|
||||||
|
if(guid == "empty") guid = Functions.hash_pass(socket.handshake.headers["user-agent"] + socket.handshake.address + socket.handshake.headers["accept-language"]);
|
||||||
|
|
||||||
socket.guid = guid;
|
socket.guid = guid;
|
||||||
socket.on('close', function() {
|
socket.on('close', function() {
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ window.addEventListener("DOMContentLoaded", function() {
|
|||||||
M.toast({ html: "Connected!", displayLength: 2000, classes: "green lighten"});
|
M.toast({ html: "Connected!", displayLength: 2000, classes: "green lighten"});
|
||||||
//before_toast();
|
//before_toast();
|
||||||
}
|
}
|
||||||
Chat.namechange("", true, true);
|
//Chat.namechange("", true, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*socket.on("name", function(data) {
|
/*socket.on("name", function(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user