...which would've ruined participants' leaderboard rankings, stop
binding the Trivia object's context to timeouts now that they're no
longer needed, make question database commands exclusive to Question
Workshop
Fix number and timer modes' question timeouts looping until no questions
are left, refactor Trivia object to only make methods the commands use
public, optimize /triviaaccept and /triviareject
Stop the Q/A loop from clearing timeouts constantly so games can be
ended in case it still loops endlessly, refactor game commands and
config vars, minor bug fixes in /triviasubmit and /triviastatus
This whole time I thought negative values were falsey. At least I caught it before it could crash anything again.
Also fix /triviarank picking up the wrong alt's rank
Timer mode now gives points to all who answer within the time limit
instead of the first, and /ta works more straightforwardly. sleep should
no longer cause the Q/A loop to ignore any commands until it runs out of
questions.
Fix scores broken from commit 6d7a3cf333,
remove unused curQ variable, remove unused parameters in the
commands, and lower the rank required to edit questions to %.
Fix bug in the question/answer loop that would assign undefined to
either curQ, curA, or phase, preventing anyone from answering any
questions until this.curQs was empty, by changing all of the game
variables from global variables to Trivia properties. Created a
constructor for Trivia so its methods could be kept in its prototype
object to reduce property lookup times and later to allow me to refactor
parts of the commands that deal with these properties as prototype
methods.
Fix room.addRaw not updating chat.
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.
All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.