diff --git a/chat-plugins/trivia.js b/chat-plugins/trivia.js index 500c73a605..ea2be98795 100644 --- a/chat-plugins/trivia.js +++ b/chat-plugins/trivia.js @@ -164,7 +164,6 @@ var Trivia = (function () { } Trivia.prototype.addParticipant = function (output, user) { - if (this.phase !== 'signup') return output.sendReply("There is no trivia game in its signup phase."); if (this.participants.has(user.userid)) return output.sendReply("You have already signed up for this trivia game."); var latestIp = user.latestIp; @@ -183,7 +182,7 @@ var Trivia = (function () { scoreData.responderIndex = -1; } this.participants.set(user.userid, scoreData); - output.sendReply("You have signed up for the next trivia game."); + output.sendReply("You have signed up for the trivia game."); }; Trivia.prototype.kickParticipant = function (output, target) { @@ -198,7 +197,7 @@ var Trivia = (function () { }; Trivia.prototype.startGame = function (output) { - if (this.phase !== 'signup') return output.sendReply("There is no trivia game in its signup phase."); + if (this.phase !== 'signup') return output.sendReply("There is no trivia game to start."); if (this.participants.size < 3) return output.sendReply("Not enough users have signed up yet! Trivia games require at least three participants to run."); if (this.category === 'random') { @@ -216,7 +215,7 @@ var Trivia = (function () { return false; } - this.room.addRaw("
Signups have ended and the game has begun!
"); + this.room.addRaw("
The game has begun!
"); this.askQuestion(); }; @@ -592,6 +591,7 @@ var commands = { if (room.id !== 'trivia') return false; var trivium = trivia[room.id]; if (!trivium) return this.sendReply("There is no trivia game in progress."); + if (!this.canTalk()) return; trivium.addParticipant(this, user); }, joinhelp: ["/trivia join - Join a trivia game during signups."], @@ -667,7 +667,8 @@ var commands = { var submission = { category: category, question: question, - answers: answers + answers: answers, + user: user.userid }; if (cmd === 'add') { @@ -693,12 +694,12 @@ var commands = { var buffer = "|raw|
" + "" + - ""; + ""; var i = 0; while (i < submissionsLen) { var entry = submissions[i]; - buffer += ""; + buffer += ""; } buffer += "
" + submissionsLen + " questions await review:
#CategoryQuestionAnswer(s)
#CategoryQuestionAnswer(s)Submitted By
" + (++i) + "" + entry.category + "" + entry.question + "" + entry.answers.join(", ") + "
" + (++i) + "" + entry.category + "" + entry.question + "" + entry.answers.join(", ") + "" + entry.user + "
";