-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play limit #21
Comments
this is the standard play limit code plus two conditions added.
this is what you meant? //iterates through the dj list incrementing dj song counts and
//removing them if they are over the limit.
var djId = data.room.metadata.current_dj;
if (typeof (djs20[djId]) !== 'undefined')
{
if (++djs20[djId].nbSong >= playLimit)
{
if (PLAYLIMIT === true && queueList.length > 0 && currentDjs.length >== 5) //if play limit is on and no one is in queue
{ //and greater than or equal to 5 dj's on stage
if (djId == currentDjs[0] && playLimit === 1) //if person is in the far left seat and limit is set to one
{
var checklist33 = theUsersList.indexOf(djId) + 1;
bot.speak('@' + theUsersList[checklist33] + ' you are over the playlimit of ' + playLimit + ' song');
bot.remDj(djId);
}
else if (djId != USERID && playLimit !== 1) //if limit is more than one
{
var checklist33 = theUsersList.indexOf(djId) + 1;
bot.speak('@' + theUsersList[checklist33] + ' you are over the playlimit of ' + playLimit + ' songs');
bot.remDj(djId);
}
}
}
} |
Right. I've had less than 5 dj's on stage with no one in the q and it still escorts people. |
well it shouldn't now... it was never setup to only escort when 5 dj's on stage in the first place |
Ok, so what do I need to change? |
this code should work... |
only activates when play limit is turned on, more than zero people in the queue and 5 dj's on stage. it also waits until it loop around the left side when the play limit is set to 1 |
its found in the endsong event at the very end of the file... you should see an old version of it in your file |
I was wondering if it could be enforced on a condition of that there must be 5 dj's on deck for the playlimit to be enforced. When there are less than 5 dj's on deck = no enforcement.
The text was updated successfully, but these errors were encountered: