Created
February 20, 2015 06:25
-
-
Save elwayman02/6d304d424cda273d345a to your computer and use it in GitHub Desktop.
p3 fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onWaitListUpdate: function() { | |
// If autojoin is not enabled, don't try to disable | |
if (!Settings.autojoin) return; | |
// If user is DJing, don't try to disable | |
var dj = API.getDJ(); | |
if (dj !== null && dj.id === API.getUser().id) return; | |
// If user is in waitlist, don't try to disable | |
if (API.getWaitListPosition() > -1) return; | |
// If waitlist is full, don't try to disable | |
if (API.getWaitList().length == 50) return; | |
// If user was last DJ (DJ Cycle Disabled) | |
if (this.lastDJ == API.getUser().id) return; | |
// Disable | |
Settings.autojoin = false; | |
Menu.setEnabled('join', Settings.autojoin); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the logic basically goes like this: