Closed btburbank closed 11 years ago
I can't tell you unless you upload your code, sorry. Once you upload your code I can, though.
Ok, I'll post the code I'm trying to modify.
On Tue, Apr 30, 2013 at 8:04 PM, Marcello Africano <notifications@github.com
wrote:
I can't tell you unless you upload your code, sorry. Once you upload your code I can, though.
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17261853 .
Okay, sounds good.
else if (text.match(/^\/q+$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
It's not making any sense to me. I get a pm saying that I need to be in the q to use /q-. But, using /q+ does nothing.
Hold on, I'm reading your code, give me a second...
Okay, replace this:
else if (text.match(/^\/addme$/) && queue === true)
{
var list3 = queueList.indexOf(data.name);
var list10 = currentDjs.indexOf(data.userid)
var checkStageList = stageList.indexOf(data.userid);
var checkManualStageList = bannedFromStage.indexOf(data.userid);
if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1)
{
queueList.push(data.name, data.userid);
queueName.push(data.name);
var temp91 = 'The queue is now: ';
for (var hj = 0; hj < queueName.length; hj++)
{
if (hj != (queueName.length - 1))
{
temp91 += queueName[hj] + ', ';
}
else if (hj == (queueName.length - 1))
{
temp91 += queueName[hj];
}
}
bot.speak(temp91);
}
}
with this:
else if (text.match(/^\/q+$/) && queue === true)
{
var list3 = queueList.indexOf(data.name);
var list10 = currentDjs.indexOf(data.userid)
var checkStageList = stageList.indexOf(data.userid);
var checkManualStageList = bannedFromStage.indexOf(data.userid);
if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1)
{
queueList.push(data.name, data.userid);
queueName.push(data.name);
var temp91 = 'The queue is now: ';
for (var hj = 0; hj < queueName.length; hj++)
{
if (hj != (queueName.length - 1))
{
temp91 += queueName[hj] + ', ';
}
else if (hj == (queueName.length - 1))
{
temp91 += queueName[hj];
}
}
bot.speak(temp91);
}
}
If that doesn't work, tell me.
Ok, thanks for the help, lemme test it out.
On Tue, Apr 30, 2013 at 8:17 PM, Marcello Africano <notifications@github.com
wrote:
Okay, replace this:
else if (text.match(/^\/addme$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
with this:
else if (text.match(/^\/q+$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
If that doesn't work, tell me.
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17262202 .
Nope. Still not working.
On Tue, Apr 30, 2013 at 8:18 PM, Brad Burbank btburbank@gmail.com wrote:
Ok, thanks for the help, lemme test it out.
On Tue, Apr 30, 2013 at 8:17 PM, Marcello Africano < notifications@github.com> wrote:
Okay, replace this:
else if (text.match(/^\/addme$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
with this:
else if (text.match(/^\/q+$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
If that doesn't work, tell me.
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17262202 .
/q- is working just fine though.
On Tue, Apr 30, 2013 at 8:29 PM, Brad Burbank btburbank@gmail.com wrote:
Nope. Still not working.
On Tue, Apr 30, 2013 at 8:18 PM, Brad Burbank btburbank@gmail.com wrote:
Ok, thanks for the help, lemme test it out.
On Tue, Apr 30, 2013 at 8:17 PM, Marcello Africano < notifications@github.com> wrote:
Okay, replace this:
else if (text.match(/^\/addme$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
with this:
else if (text.match(/^\/q+$/) && queue === true) { var list3 = queueList.indexOf(data.name); var list10 = currentDjs.indexOf(data.userid) var checkStageList = stageList.indexOf(data.userid); var checkManualStageList = bannedFromStage.indexOf(data.userid); if (list3 == -1 && list10 == -1 && checkStageList == -1 && checkManualStageList == -1) { queueList.push(data.name, data.userid); queueName.push(data.name); var temp91 = 'The queue is now: '; for (var hj = 0; hj < queueName.length; hj++) { if (hj != (queueName.length - 1)) { temp91 += queueName[hj] + ', '; } else if (hj == (queueName.length - 1)) { temp91 += queueName[hj]; } } bot.speak(temp91); } }
If that doesn't work, tell me.
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17262202 .
try
else if (text == '/q+' && queue === true)
No go. Still reports the q is empty.
On Tue, Apr 30, 2013 at 8:34 PM, chris larosa notifications@github.comwrote:
try
else if (text == 'q+' && queue === true)
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17262722 .
just tested it and it works for me...
guess u can do this too if u really wanna stick with regular expressions
else if (text.match(/^\/q\+$/) && queue === true)
and of course it would say the queue is empty if your the only one in it and you remove yourself... if its working it should tell you right when you join the queue that your in it
Well lemme try that then.
On Tue, Apr 30, 2013 at 8:45 PM, chris larosa notifications@github.comwrote:
guess u can do this too if u really wanna stick with regular expressions
else if (text.match(/^\/q+$/) && queue === true)
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17263034 .
also make sure ur not modifying the pm version or something and thinking its the chat like i sometimes do :p and make sure the queue is on and make sure nothing would match that q+ statement in your else if hierarchy before it reaches it
It's not add me at all. I get no notification of any kind. This has me genuinely stumped.
On Tue, Apr 30, 2013 at 8:46 PM, chris larosa notifications@github.comwrote:
and of course it would say the queue is empty if your the only one in it and you remove yourself... if its working it should tell you right when you join the queue that your in it
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17263080 .
Your line of code fixed the issue Chris. I'm still testing out the other minor changes I made to the q commands.
On Tue, Apr 30, 2013 at 8:48 PM, chris larosa notifications@github.comwrote:
also make sure ur not modifying the pm version or something and thinking its the chat like i sometimes do :p and make sure the queue is on and make sure nothing would match that q+ statement in your else if hierarchy before it reaches it
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17263129 .
good to hear ;)
This can be closed, and if I have any other issues, I'll open a request.
On Tue, Apr 30, 2013 at 8:51 PM, chris larosa notifications@github.comwrote:
good to hear ;)
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17263239 .
Don't forget to make sure you change /commands to show /q+ instead of /addme.
Yeah I fixed that too.
On Tue, Apr 30, 2013 at 9:20 PM, Marcello Africano <notifications@github.com
wrote:
Don't forget to make sure you change /commands to show /q+ instead of /addme.
— Reply to this email directly or view it on GitHubhttps://github.com/samuri51/chillybot/issues/20#issuecomment-17264005 .
I'm trying to simplify the q commands a bit. I changed the q commands to /q+ and /q- the bot will not respond to /q+ of those changes. What did I miss?