From b75667bb86022222da2bc10550d93cd0d60c3f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sun, 8 May 2016 17:46:41 +0200 Subject: [PATCH] reset at correct position and display right name --- bot.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 6a91072..89cb7ab 100644 --- a/bot.py +++ b/bot.py @@ -366,7 +366,8 @@ def skip_player(bot, update): "been reduced to %d seconds.\n" "Next player: %s" % (game.current_player.waiting_time, - display_name(game.current_player.user))) + display_name( + game.current_player.user.next))) game.turn() return @@ -480,15 +481,15 @@ def process_result(bot, update): logger.debug("Selected result: " + result_id) + result_id, anti_cheat = result_id.split(':') + last_anti_cheat = player.anti_cheat + player.anti_cheat += 1 + if player.waiting_time < 90: player.waiting_time = 90 send_async(bot, chat_id, text="Waiting time for %s has been reset to " "90 seconds" % display_name(user)) - result_id, anti_cheat = result_id.split(':') - last_anti_cheat = player.anti_cheat - player.anti_cheat += 1 - if result_id in ('hand', 'gameinfo', 'nogame'): return elif len(result_id) == 36: # UUID result