summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-25 18:02:31 -0500
committerdoy <doy@tozt.net>2009-01-25 18:02:31 -0500
commitc4d16a74aa9686f61ef6f775409e15e5110b9eab (patch)
tree73aa40d65681a024cffe516687999b087eef7be6 /lib/Bot/Games.pm
parentd9b0b9b5de58441bfc7021815b34beea0843370d (diff)
downloadbot-games-c4d16a74aa9686f61ef6f775409e15e5110b9eab.tar.gz
bot-games-c4d16a74aa9686f61ef6f775409e15e5110b9eab.zip
don't use is_over for holding the ending message, just return it or use $self->say
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r--lib/Bot/Games.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index a3b0112..ef8a721 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -87,10 +87,8 @@ sub said {
$self->$say($turn) if $turn;
}
- if (my $end_msg = $game->is_over) {
- $self->$say($end_msg);
- delete $self->active_games->{$game_name};
- }
+ delete $self->active_games->{$game_name} if ($game->is_over);
+
return;
}