mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed shuffle issue where users not logged in could not shuffle
This commit is contained in:
@@ -431,11 +431,12 @@ io.on('connection', function(socket){
|
||||
|
||||
socket.on('shuffle', function(pass)
|
||||
{
|
||||
if(pass !== undefined && pass !== null && pass != "")
|
||||
if(pass !== undefined && pass !== null)
|
||||
{
|
||||
check_inlist(coll, guid, socket, name);
|
||||
|
||||
var hash = hash_pass(pass);
|
||||
if(pass == "") var hash = pass;
|
||||
else var hash = hash_pass(pass);
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||
if(docs !== null && docs.length != 0 && ((docs[0]["adminpass"] == hash || docs[0]["adminpass"] == "") || docs[0]["shuffle"] == false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user