Added a try-again for commands with password if there exists an adminass saved

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-28 15:40:55 +01:00
parent 7b66575ea8
commit 2e8ef6739c
5 changed files with 54 additions and 13 deletions

View File

@@ -535,7 +535,7 @@ var List = {
vote: function(id, vote) {
if(!offline || (vote == "del" && (hasadmin && (!w_p && adminpass != "")))){
socket.emit('vote', {channel: chan, id: id, type: vote, adminpass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
emit('vote', {channel: chan, id: id, type: vote, adminpass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
} else {
if(vote == "pos"){
List.voted_song(id, (new Date()).getTime()/1000);
@@ -548,7 +548,7 @@ var List = {
skip: function(way) {
if(!offline){
socket.emit('skip', {pass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), id:video_id, channel: chan.toLowerCase(), userpass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
emit('skip', {pass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass), id:video_id, channel: chan.toLowerCase(), userpass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
} else {
if(way) {
Player.playNext();