- isit = @games[k].check(word)\r
- case isit.first\r
- when :bingo\r
- m.reply _("%{bold}BINGO!%{bold} the word was %{underline}%{word}%{underline}. Congrats, %{bold}%{player}%{bold}!") % {:bold => Bold, :underline => Underline, :word => word, :player => m.sourcenick}\r
- @games[k].total_tries += 1\r
- @games[k].tries[m.source] += 1\r
- @games[k].winner = m.source\r
- ar = @games[k].score.inject([]) { |res, kv|\r
- res.push("%s: %d (%s)" % kv.flatten)\r
- }\r
- m.reply _("The game was won after %{tries} tries. Scores for this game: %{scores}") % {:tries => @games[k].total_tries, :scores => ar.join('; ')}\r
- @games.delete(k)\r
- when :out\r
- m.reply _("%{word} is not in the range %{bold}%{range}%{bold}") % {:word => word, :bold => Bold, :range => isit.last} if m.address?\r
- when :noexist\r
- m.reply _("%{word} doesn't exist or is not acceptable for the game") % {:word => word}\r
- @games[k].total_failed += 1\r
- @games[k].failed[m.source] += 1\r
- when :in\r
- m.reply _("close, but no cigar. New range: %{bold}%{range}%{bold}") % {:bold => Bold, :range => isit.last}\r
- @games[k].total_tries += 1\r
- @games[k].tries[m.source] += 1\r
- when :ignore\r
- m.reply _("%{word} is already one of the range extrema: %{range}") % {:word => word, :range => isit.last} if m.address?\r
- else\r
- m.reply _("hm, something went wrong while verifying %{word}")\r
- end\r
+ # Not really safe ... what happens\r
+ Thread.new {\r
+ isit = @games[k].check(word)\r
+ case isit.first\r
+ when :bingo\r
+ m.reply _("%{bold}BINGO!%{bold} the word was %{underline}%{word}%{underline}. Congrats, %{bold}%{player}%{bold}!") % {:bold => Bold, :underline => Underline, :word => word, :player => m.sourcenick}\r
+ @games[k].total_tries += 1\r
+ @games[k].tries[m.source] += 1\r
+ @games[k].winner = m.source\r
+ ar = @games[k].score.inject([]) { |res, kv|\r
+ res.push("%s: %d (%s)" % kv.flatten)\r
+ }\r
+ m.reply _("The game was won after %{tries} tries. Scores for this game: %{scores}") % {:tries => @games[k].total_tries, :scores => ar.join('; ')}\r
+ @games.delete(k)\r
+ when :out\r
+ m.reply _("%{word} is not in the range %{bold}%{range}%{bold}") % {:word => word, :bold => Bold, :range => isit.last} if m.address?\r
+ when :noexist\r
+ m.reply _("%{word} doesn't exist or is not acceptable for the game") % {:word => word}\r
+ @games[k].total_failed += 1\r
+ @games[k].failed[m.source] += 1\r
+ when :in\r
+ m.reply _("close, but no cigar. New range: %{bold}%{range}%{bold}") % {:bold => Bold, :range => isit.last}\r
+ @games[k].total_tries += 1\r
+ @games[k].tries[m.source] += 1\r
+ when :ignore\r
+ m.reply _("%{word} is already one of the range extrema: %{range}") % {:word => word, :range => isit.last} if m.address?\r
+ else\r
+ m.reply _("hm, something went wrong while verifying %{word}")\r
+ end\r
+ }\r