mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Names reimplemented, just a little better
This commit is contained in:
@@ -46,34 +46,49 @@ function all_chat(msg, guid, offline, socket) {
|
||||
}
|
||||
}
|
||||
|
||||
function namechange(data, guid, coll) {
|
||||
if(typeof(data) !== "string" || coll == undefined) return;
|
||||
data = encodeURIComponent(data).replace(/\W/g, '').replace(/[^\x00-\x7F]/g, "");
|
||||
db.collection("user_names").find({"guid": guid}, function(err, docs) {
|
||||
if(docs.length == 1) {
|
||||
if(docs[0].name == data) return;
|
||||
var change_name = function(new_name, guid, old_name) {
|
||||
if(new_name.length > 9) {
|
||||
return;
|
||||
} else {
|
||||
db.collection("user_names").update({"_id": "all_names"}, {$addToSet: {names: new_name}}, function(err, updated) {
|
||||
if(updated.nModified == 1) {
|
||||
db.collection("user_names").update({"guid": guid}, {$set: {name: new_name}}, function(err, updated) {
|
||||
db.collection("user_names").update({"_id": "all_names"}, {$pull: {names: old_name}}, function(err, updated) {});
|
||||
name = new_name;
|
||||
io.to(coll).emit('chat', {from: old_name, msg: " changed name to " + name});
|
||||
io.sockets.emit('chat.all', {from: old_name , msg: " changed name to " + name, channel: coll});
|
||||
});
|
||||
} else {
|
||||
change_name(new_name + "_", guid, old_name);
|
||||
function namechange(data, guid, socket) {
|
||||
if(!data.hasOwnProperty("name") || data.name.length > 10 || !data.hasOwnProperty("channel")) return;
|
||||
var pw = "";
|
||||
var new_password;
|
||||
if(data.hasOwnProperty("password")) {
|
||||
pw = data.password;
|
||||
new_password = false;
|
||||
} else if(data.hasOwnProperty("new_password") && data.hasOwnProperty("old_password")) {
|
||||
pw = data.old_password;
|
||||
new_password = Functions.decrypt_string(socket.zoff_id, data.new_password);
|
||||
}
|
||||
var password = Functions.decrypt_string(socket.zoff_id, pw);
|
||||
var name = data.name;
|
||||
db.collection("registered_users").find({"_id": name}, function(err, docs) {
|
||||
var accepted_password = false;
|
||||
if(docs.length == 0) {
|
||||
if(new_password) {
|
||||
return;
|
||||
}
|
||||
accepted_password = true;
|
||||
db.collection("registered_users").update({"_id": name}, {$set: {password: Functions.hash_pass(password)}}, {upsert: true}, function() {});
|
||||
} else if(docs[0].password == Functions.hash_pass(password)) {
|
||||
accepted_password = true;
|
||||
if(new_password) {
|
||||
db.collection("registered_users").update({"_id": name, password: Functions.hash_pass(password)}, {$set: {password: Functions.hash_pass(new_password)}}, function() {});
|
||||
}
|
||||
}
|
||||
if(accepted_password) {
|
||||
db.collection("user_names").find({"guid": guid}, function(err, names) {
|
||||
var old_name = names[0].name;
|
||||
db.collection("user_names").update({"_id": "all_names"}, {$pull: {names: old_name}}, function() {});
|
||||
db.collection("user_names").update({"guid": guid}, {$set: {name: name}}, function(err, docs) {
|
||||
db.collection("user_names").update({"_id": "all_names"}, {$addToSet: {names: name}}, function(err, docs) {
|
||||
socket.emit('name', {type: "name", accepted: true});
|
||||
if(old_name != name) {
|
||||
io.to(data.channel).emit('chat', {from: old_name, msg: " changed name to " + name});
|
||||
io.sockets.emit('chat.all', {from: old_name , msg: " changed name to " + name, channel: data.channel});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var old_name = docs[0].name;
|
||||
change_name(data, guid, old_name);
|
||||
|
||||
});
|
||||
});
|
||||
} else {
|
||||
socket.emit('name', {type: "name", accepted: false});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,6 +79,18 @@ module.exports = function() {
|
||||
Suggestions.description(msg, coll, guid, offline, socket);
|
||||
});
|
||||
|
||||
socket.on("namechange", function(msg) {
|
||||
Chat.namechange(msg, guid, socket);
|
||||
});
|
||||
|
||||
socket.on("removename", function(msg) {
|
||||
if(typeof(msg) != "object" || !msg.hasOwnProperty("channel")) {
|
||||
socket.emit("update_required");
|
||||
return;
|
||||
}
|
||||
Chat.removename(guid, msg.channel);
|
||||
});
|
||||
|
||||
socket.on("offline", function(msg){
|
||||
if(!msg.hasOwnProperty('status') && !msg.hasOwnProperty('channel')) {
|
||||
socket.emit("update_required");
|
||||
|
||||
2
server/public/assets/dist/embed.min.js
vendored
2
server/public/assets/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
server/public/assets/dist/main.min.js
vendored
2
server/public/assets/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2,152 +2,171 @@ var Chat = {
|
||||
|
||||
channel_received: 0,
|
||||
all_received: 0,
|
||||
chat_help: [/*"/name <new name> to change name", "/removename to remove name"*/ "There are no commands.. As of now!"],
|
||||
chat_help: ["/name <new name> <password> to register and save a password for a nickname", "/name <new name> <new_password> <old_password> to change the password on a nickname", "/removename to logout"],//, "There are no commands.. As of now!"],
|
||||
|
||||
namechange: function(newName) {
|
||||
socket.emit("namechange", {name: newName, channel: chan.toLowerCase()});
|
||||
Crypt.set_name(newName);
|
||||
namechange: function(data) {
|
||||
var input = data.split(" ");
|
||||
if(input.length == 2) {
|
||||
var name = input[0];
|
||||
var password = input[1];
|
||||
temp_name = name;
|
||||
temp_pass = password;
|
||||
password = Crypt.crypt_pass(password);
|
||||
socket.emit("namechange", {name: name, channel: chan.toLowerCase(), password: password});
|
||||
} else if(input.length == 3) {
|
||||
var name = input[0];
|
||||
var new_password = input[1];
|
||||
var old_password = input[2];
|
||||
|
||||
temp_name = name;
|
||||
temp_pass = password;
|
||||
|
||||
new_password = Crypt.crypt_pass(new_password);
|
||||
old_password = Crypt.crypt_pass(old_password);
|
||||
|
||||
socket.emit("namechange", {name: name, channel: chan.toLowerCase(), new_password: new_password, old_password: old_password});
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
removename: function() {
|
||||
socket.emit("removename");
|
||||
socket.emit("removename", {channel: chan.toLowerCase()});
|
||||
Crypt.remove_name();
|
||||
},
|
||||
|
||||
chat: function(data) {
|
||||
if(data.value.length > 150)
|
||||
return;
|
||||
/*if(data.value.startsWith("/name ")){
|
||||
Chat.namechange(data.value.substring(6));
|
||||
} else */
|
||||
if(data.value.startsWith("/help")) {
|
||||
if($(".chat-tab-li a.active").attr("href") == "#all_chat"){
|
||||
if($("#chatall").children().length > 100) {
|
||||
$("#chatall").children()[0].remove()
|
||||
}
|
||||
for(var x = 0; x < Chat.chat_help.length; x++) {
|
||||
var color = Helper.intToARGB(Helper.hashCode("System"));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
if(data.value.length > 150) return;
|
||||
if(data.value.startsWith("/name ")){
|
||||
Chat.namechange(data.value.substring(6));
|
||||
} else if(data.value.startsWith("/help")) {
|
||||
if($(".chat-tab-li a.active").attr("href") == "#all_chat"){
|
||||
if($("#chatall").children().length > 100) {
|
||||
$("#chatall").children()[0].remove()
|
||||
}
|
||||
for(var x = 0; x < Chat.chat_help.length; x++) {
|
||||
var color = Helper.intToARGB(Helper.hashCode("System"));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatall").append("<li title='Zoff''><span style='color:"+color_temp+";'>System</span>: </li>");
|
||||
var in_text = document.createTextNode(Chat.chat_help[x]);
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;
|
||||
}
|
||||
} else {
|
||||
if($("#chatchannel").children().length > 100) {
|
||||
$("#chatchannel").children()[0].remove()
|
||||
}
|
||||
for(var x = 0; x < Chat.chat_help.length; x++) {
|
||||
|
||||
var color = Helper.intToARGB(Helper.hashCode("System"));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatchannel").append("<li><span style='color:"+color_temp+";'>System</span>: </li>");
|
||||
var in_text = document.createTextNode(Chat.chat_help[x]);
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight;
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatall").append("<li title='Zoff''><span style='color:"+color_temp+";'>System</span>: </li>");
|
||||
var in_text = document.createTextNode(Chat.chat_help[x]);
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;
|
||||
}
|
||||
} else if(data.value.startsWith("/removename")) {
|
||||
Chat.removename();
|
||||
} else if($(".chat-tab-li a.active").attr("href") == "#all_chat") {
|
||||
socket.emit("all,chat", {channel: chan.toLowerCase(), data: data.value});
|
||||
} else {
|
||||
if($("#chatchannel").children().length > 100) {
|
||||
$("#chatchannel").children()[0].remove()
|
||||
}
|
||||
for(var x = 0; x < Chat.chat_help.length; x++) {
|
||||
socket.emit("chat", {channel: chan.toLowerCase(), data: data.value, pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
|
||||
}
|
||||
data.value = "";
|
||||
return;
|
||||
},
|
||||
|
||||
var color = Helper.intToARGB(Helper.hashCode("System"));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatchannel").append("<li><span style='color:"+color_temp+";'>System</span>: </li>");
|
||||
var in_text = document.createTextNode(Chat.chat_help[x]);
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight;
|
||||
allchat: function(inp) {
|
||||
if(inp.msg.substring(0,1) == ":" && !chat_active) {
|
||||
Chat.all_received += 1;
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
if($(".chat-link span.badge.new.white").hasClass("hide")){
|
||||
$(".chat-link span.badge.new.white").removeClass("hide");
|
||||
}
|
||||
var to_display = Chat.channel_received + Chat.all_received > 9 ? "9+" : Chat.channel_received + Chat.all_received;
|
||||
$(".chat-link span.badge.new.white").html(to_display);
|
||||
}
|
||||
|
||||
if(document.hidden) {
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
}
|
||||
|
||||
if($("#chatall").children().length > 100) {
|
||||
$("#chatall").children()[0].remove()
|
||||
}
|
||||
var color = Helper.intToARGB(Helper.hashCode(inp.from));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++){
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
} else if(data.value.startsWith("/removename")) {
|
||||
Chat.removename();
|
||||
} else if($(".chat-tab-li a.active").attr("href") == "#all_chat") {
|
||||
socket.emit("all,chat", {channel: chan.toLowerCase(), data: data.value});
|
||||
} else {
|
||||
socket.emit("chat", {channel: chan.toLowerCase(), data: data.value, pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
|
||||
}
|
||||
data.value = "";
|
||||
return;
|
||||
},
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatall").append("<li title='"+inp.channel+"''><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+inp.from+"</span></li>");
|
||||
var in_text = document.createTextNode(inp.msg);
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;
|
||||
},
|
||||
|
||||
allchat: function(inp) {
|
||||
if(inp.msg.substring(0,1) == ":" && !chat_active) {
|
||||
Chat.all_received += 1;
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
if($(".chat-link span.badge.new.white").hasClass("hide")){
|
||||
$(".chat-link span.badge.new.white").removeClass("hide");
|
||||
channelchat: function(data) {
|
||||
if(data.msg.substring(0,1) == ":" && !chat_active) {
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
Chat.channel_received += 1;
|
||||
//blink_interval = setTimeout(Chat.chat_blink, 1000);
|
||||
if($(".chat-link span.badge.new.white").hasClass("hide")) {
|
||||
$(".chat-link span.badge.new.white").removeClass("hide");
|
||||
}
|
||||
var to_display = Chat.channel_received + Chat.all_received > 9 ? "9+" : Chat.channel_received + Chat.all_received;
|
||||
$(".chat-link span.badge.new.white").html(to_display);
|
||||
}
|
||||
var to_display = Chat.channel_received + Chat.all_received > 9 ? "9+" : Chat.channel_received + Chat.all_received;
|
||||
$(".chat-link span.badge.new.white").html(to_display);
|
||||
}
|
||||
|
||||
if(document.hidden) {
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
}
|
||||
|
||||
if($("#chatall").children().length > 100) {
|
||||
$("#chatall").children()[0].remove()
|
||||
}
|
||||
var color = Helper.intToARGB(Helper.hashCode(inp.from));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++){
|
||||
color = "0" + color;
|
||||
if($("#chatchannel").children().length > 100) {
|
||||
$("#chatchannel").children()[0].remove()
|
||||
}
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatall").append("<li title='"+inp.channel+"''><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+inp.from+"</span></li>");
|
||||
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) {
|
||||
if(data.msg.substring(0,1) == ":" && !chat_active) {
|
||||
$("#favicon").attr("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
Chat.channel_received += 1;
|
||||
//blink_interval = setTimeout(Chat.chat_blink, 1000);
|
||||
if($(".chat-link span.badge.new.white").hasClass("hide")) {
|
||||
$(".chat-link span.badge.new.white").removeClass("hide");
|
||||
var color = Helper.intToARGB(Helper.hashCode(data.from));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
var to_display = Chat.channel_received + Chat.all_received > 9 ? "9+" : Chat.channel_received + Chat.all_received;
|
||||
$(".chat-link span.badge.new.white").html(to_display);
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatchannel").append("<li><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+data.from+"</span></li>");
|
||||
var in_text = document.createTextNode(data.msg);
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight;
|
||||
},
|
||||
|
||||
if($("#chatchannel").children().length > 100) {
|
||||
$("#chatchannel").children()[0].remove()
|
||||
}
|
||||
|
||||
var color = Helper.intToARGB(Helper.hashCode(data.from));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++) {
|
||||
color = "0" + color;
|
||||
}
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatchannel").append("<li><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+data.from+"</span></li>");
|
||||
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() {
|
||||
blinking = true;
|
||||
$(".chat-link").attr("style", "color: grey !important;");
|
||||
setTimeout(function () {
|
||||
$(".chat-link").attr("style", "color: white !important;");
|
||||
setTimeout(function() {
|
||||
if(blinking) Chat.chat_blink();
|
||||
chat_blink: function() {
|
||||
blinking = true;
|
||||
$(".chat-link").attr("style", "color: grey !important;");
|
||||
setTimeout(function () {
|
||||
$(".chat-link").attr("style", "color: white !important;");
|
||||
setTimeout(function() {
|
||||
if(blinking) Chat.chat_blink();
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,7 +29,11 @@ var Crypt = {
|
||||
|
||||
Hostcontroller.change_enabled(conf_arr.remote);
|
||||
if(conf_arr.width != 100) Player.set_width(conf_arr.width);
|
||||
//if(conf_arr.name !== undefined && conf_arr.name !== "") Chat.namechange(conf_arr.name);
|
||||
if(conf_arr.name !== undefined && conf_arr.name !== "" && conf_arr.chat_pass !== undefined && conf_arr.chat_pass !== ""){
|
||||
setTimeout(function() {
|
||||
Chat.namechange(conf_arr.name + " " + conf_arr.chat_pass);
|
||||
}, 100); //to take height for delay on establishing connection
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -158,8 +162,9 @@ var Crypt = {
|
||||
Crypt.encrypt(Crypt.conf_pass, chan.toLowerCase());
|
||||
},
|
||||
|
||||
set_name:function(name) {
|
||||
set_name:function(name, pass) {
|
||||
conf_arr.name = encodeURIComponent(name).replace(/\W/g, '');
|
||||
conf_arr.chat_pass = pass;
|
||||
Crypt.encrypt(conf_arr, "_opt");
|
||||
},
|
||||
|
||||
@@ -170,6 +175,7 @@ var Crypt = {
|
||||
|
||||
remove_name:function() {
|
||||
conf_arr.name = "";
|
||||
conf_arr.chat_pass = "";
|
||||
Crypt.encrypt(conf_arr, "_opt");
|
||||
},
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ var Crypt = {
|
||||
|
||||
function receiveMessage(event) {
|
||||
if(event.data == "parent") {
|
||||
//console.log(event);
|
||||
window.parentWindow = event.source;
|
||||
window.parentOrigin = event.origin;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ var frontpage = 1;
|
||||
var adminpass = "";
|
||||
var showDiscovery = false;
|
||||
var filesadded = "";
|
||||
var temp_name = "";
|
||||
var temp_pass = "";
|
||||
var chromecast_icon_color = "";
|
||||
var player_ready = false;
|
||||
var viewers = 1;
|
||||
@@ -150,16 +152,28 @@ $().ready(function(){
|
||||
if(offline) {
|
||||
socket.emit("offline", {status: true, channel: chan != undefined ? chan.toLowerCase() : ""});
|
||||
}
|
||||
if((Crypt.get_pass(chan.toLowerCase()) !== undefined && Crypt.get_pass(chan.toLowerCase()) !== "")){
|
||||
if(chan != undefined && (Crypt.get_pass(chan.toLowerCase()) !== undefined && Crypt.get_pass(chan.toLowerCase()) !== "")){
|
||||
socket.emit("password", {password: Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), channel: chan.toLowerCase()});
|
||||
}
|
||||
if(chan != undefined && conf_arr.name !== undefined && conf_arr.name !== "" && conf_arr.chat_pass !== undefined && conf_arr.chat_pass !== ""){
|
||||
setTimeout(function() {
|
||||
Chat.namechange(conf_arr.name + " " + conf_arr.chat_pass);
|
||||
}, 100); //to take height for delay on establishing connection
|
||||
}
|
||||
});
|
||||
}
|
||||
/*if(conf_arr != undefined && conf_arr.name !== undefined && conf_arr.name !== "") {
|
||||
setTimeout(function(){
|
||||
Chat.namechange(conf_arr.name);
|
||||
}, 1000);
|
||||
}*/
|
||||
|
||||
});
|
||||
|
||||
socket.on("name", function(data) {
|
||||
if(data.type == "name" && data.accepted) {
|
||||
Crypt.set_name(temp_name, temp_pass);
|
||||
temp_name = "";
|
||||
temp_pass = "";
|
||||
} else {
|
||||
temp_name = "";
|
||||
temp_pass = "";
|
||||
}
|
||||
});
|
||||
|
||||
socket.on("self_ping", function() {
|
||||
|
||||
Reference in New Issue
Block a user