From 11fe3ea3c6848fc1838a4d284ddcfaeb30ac17bc Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 2 Jul 2010 12:08:37 +0200 Subject: UNO! plugin: stop join_timer on end_game This prevents a game from starting after it has ended. --- data/rbot/plugins/games/uno.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'data') 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}") % { -- cgit v1.2.3