diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-07-02 12:08:37 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-07-02 12:08:37 +0200 |
commit | 11fe3ea3c6848fc1838a4d284ddcfaeb30ac17bc (patch) | |
tree | 11b658dc80c5ce50b781b981c7b815a685f8e153 | |
parent | e432044b6a769cae6ff501e80161a6abd7669fde (diff) |
UNO! plugin: stop join_timer on end_game
This prevents a game from starting after it has ended.
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 3d874bf9..4ae05f6e 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -750,6 +750,11 @@ class UnoGame def end_game(halted = false) runtime = @start_time ? Time.now - @start_time : 0 + if @join_timer + @bot.timer.remove(@join_timer) + announce _("game start countdown stopped") + @join_timer = nil + end if halted if @start_time announce _("%{uno} game halted after %{time}") % { |