Closed JimmyRehberg closed 11 years ago
very interesting... yes this is happening because of the asterixs in your name. I'd have to think of how to fix it.
as for the play limit only enforcing when there are people in the queue. this code needs to be changed as follows. its around line 3556 in the script.
var djId = data.room.metadata.current_dj;
var isMaster = masterIds.indexOf(djId);
if (++djs20[djId].nbSong >= playLimit)
{
var checklist33 = theUsersList.indexOf(djId) + 1;
if (djId != USERID && PLAYLIMIT === true && isMaster == -1)
{
if (queueList.length !== 0) //this is whats being added (if theres not zero people in the queue)
{
bot.speak('@' + theUsersList[checklist33] + ' you are over the playlimit of ' + playLimit + ' songs');
bot.remDj(djId);
}
}
}
this is how to fix the afk issue... you need to replace this code starting around 1850 or so. or you can just re-download the script since i updated it.
//checks to see if someone is trying to speak to an afk person or not.
if (afkPeople.length !== 0 && data.userid != USERID)
{
for (var j = 0; j < afkPeople.length; j++) //loop through afk people array
{
var areTheyAfk56 = data.text.toLowerCase().indexOf(afkPeople[j].toLowerCase()); //is an afk persons name being called
if (areTheyAfk56 !== -1)
{
bot.speak(afkPeople[j] + ' is afk');
}
}
}
changes made and working great!!
thank you so much and I really do appreciate it!!
James
On Feb 9, 2013, at 9:26 PM, chris larosa notifications@github.com wrote:
this is how to fix the afk issue... you need to replace this code starting around 1850 or so. or you can just re-download the script since i updated it.
//checks to see if someone is trying to speak to an afk person or not. if (afkPeople.length !== 0 && data.userid != USERID) { for (var j = 0; j < afkPeople.length; j++) //loop through afk people array { var areTheyAfk56 = data.text.toLowerCase().indexOf(afkPeople[j]); //is an afk persons name being called if (areTheyAfk56 !== -1) { bot.speak(afkPeople[j] + ' is afk'); } } }
— Reply to this email directly or view it on GitHub..
no problem but make sure you add the .toLowerCase() in. it was an error on my part, without that if someones name contains upper case letters it wont work.
var areTheyAfk56 = data.text.toLowerCase().indexOf(afkPeople[j].toLowerCase());
hey,
i have to ask what this and can i remove it?
else if (text.match(/^\/m/) && !text.match(/^\/me/) && condition === true) { bot.speak(text.substring(3)); }
thats the /m command, its up to you whether you want to remove any of the commands or not... what that does is enable you to type through the bot, only moderators can do it.
/m hello results in: hello
its also available through the pm where it is almost exclusively used though so no big loss if you remove it from the text box options
I like that..I'll keep it
thanks
James
On Feb 10, 2013, at 11:34 PM, chris larosa notifications@github.com wrote:
thats the /m command, its up to you whether you want to remove any of the commands or not... what that does is enable you to type through the bot, only moderators can do it.
/m hello results in: hello
its also available through the pm where it is almost exclusively used though so no big loss if you move it from the text box options
— Reply to this email directly or view it on GitHub..
ok...everyone can use /afk but me...i tried after you left and it crashed the bot...i had a mod try it and it worked for him..My user name has 2 * in it ...could it be the * causing an error?
also i'd like the bot to only enforce the playlimit only when the stage if full and someone gets on waitlist..