mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added fix for total_viewers count error
This commit is contained in:
@@ -170,6 +170,7 @@ function namechange(data, guid, socket, tried, callback) {
|
|||||||
data.password = pass;
|
data.password = pass;
|
||||||
new_password = false;
|
new_password = false;
|
||||||
if(name == "" || pass == "") {
|
if(name == "" || pass == "") {
|
||||||
|
if(typeof(callback) == "function") callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -185,7 +186,9 @@ function namechange(data, guid, socket, tried, callback) {
|
|||||||
new_password = Functions.decrypt_string(data.new_password);
|
new_password = Functions.decrypt_string(data.new_password);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(name == "") {
|
if(name == "") {
|
||||||
|
if(typeof(callback) == "function") callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var password = Functions.decrypt_string(pw);
|
var password = Functions.decrypt_string(pw);
|
||||||
@@ -194,6 +197,7 @@ function namechange(data, guid, socket, tried, callback) {
|
|||||||
var icon = false;
|
var icon = false;
|
||||||
if(docs.length == 0) {
|
if(docs.length == 0) {
|
||||||
if(new_password) {
|
if(new_password) {
|
||||||
|
if(typeof(callback) == "function") callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
accepted_password = true;
|
accepted_password = true;
|
||||||
|
|||||||
@@ -115,8 +115,10 @@ function get_short_id(socket) {
|
|||||||
|
|
||||||
function check_inlist(coll, guid, socket, offline, callback)
|
function check_inlist(coll, guid, socket, offline, callback)
|
||||||
{
|
{
|
||||||
|
if(coll == undefined) {
|
||||||
if(coll == undefined) return;
|
if(typeof(callback) == "function") callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
//coll = coll.replace(/ /g,'');
|
//coll = coll.replace(/ /g,'');
|
||||||
if(!offline && coll != undefined){
|
if(!offline && coll != undefined){
|
||||||
db.collection("connected_users").update({"_id": coll}, {$addToSet:{users: guid}}, {upsert: true}, function(err, updated) {
|
db.collection("connected_users").update({"_id": coll}, {$addToSet:{users: guid}}, {upsert: true}, function(err, updated) {
|
||||||
|
|||||||
Reference in New Issue
Block a user