Fix questions being answerable twice

This commit is contained in:
Jack Bond-Preston 2016-07-13 00:00:00 +01:00
parent 3f8e6bf5f5
commit 1f6d1a774d

View File

@ -292,6 +292,7 @@ void TriviaGame::handle_answer(std::string answer, DiscordObjects::User sender)
boost::algorithm::to_lower(answer); boost::algorithm::to_lower(answer);
if (current_answers.find(answer) != current_answers.end()) { if (current_answers.find(answer) != current_answers.end()) {
current_thread->interrupt(); current_thread->interrupt();
current_answers.clear();
boost::posix_time::time_duration diff = boost::posix_time::microsec_clock::universal_time() - question_start; boost::posix_time::time_duration diff = boost::posix_time::microsec_clock::universal_time() - question_start;