From 6c5364c7ca3eada91fce06c0cc24f41340f729fc Mon Sep 17 00:00:00 2001 From: Lake Date: Fri, 25 Jun 2021 15:33:41 -0400 Subject: [PATCH] Fix use-fixed-round config comparison Fix the use-fixed-rounds config check explicitly checking for a "false", resulting in a nonexistent option being treated as "true". Fixes #232 --- triviabot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triviabot.js b/triviabot.js index 3ca8a1a..c8fb887 100644 --- a/triviabot.js +++ b/triviabot.js @@ -948,7 +948,7 @@ Trivia.doGame = async function(id, channel, author, scheduled, config, category, "config": typeof game[id]!=="undefined"?game[id].config:config }; // DELTA - Adding fixed number of rounds game -if(isFirstQuestion && getConfigVal("use-fixed-rounds", channel) !== false) { +if(isFirstQuestion && getConfigVal("use-fixed-rounds", channel) === true) { game[id].config.customRoundCount = getConfigVal("rounds-fixed-number", channel); game[id].config.useFixedRounds = 1; if(getConfigVal("debug-log")) { console.log("Setting CustomRoundCount to: " + game[id].config.customRoundCount); } // DELTA - Debug output