From 95a94c9c19beab767b0060faf8b70b0f4a64b474 Mon Sep 17 00:00:00 2001 From: James Ronan Date: Fri, 5 Aug 2011 19:30:21 +0200 Subject: [PATCH] It's nice to have the state given to you if you attempt to start a new game and one is in progress. --- lib/Bot/BasicBot/Pluggable/Module/Hangman.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Bot/BasicBot/Pluggable/Module/Hangman.pm b/lib/Bot/BasicBot/Pluggable/Module/Hangman.pm index 5e81b8e..3d1c13f 100644 --- a/lib/Bot/BasicBot/Pluggable/Module/Hangman.pm +++ b/lib/Bot/BasicBot/Pluggable/Module/Hangman.pm @@ -215,7 +215,8 @@ sub _begin_game { my $games = $bot->store->get( $namespace, 'games' ) // {}; if ( exists $games->{$game_name} ) { - return "A game is already in progress!"; + return "A game is already in progress!" + . $self->_game_state($game_name); } $game_data = {