diff options
author | doy <doy@tozt.net> | 2009-04-27 00:40:40 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-27 00:40:40 -0500 |
commit | d03fe696ce25af4efd63d5a1d2888e5c3d7b12fe (patch) | |
tree | cdcc4cddfe7bcbe7eb7dd49304098e205edf9ee7 | |
parent | f14145ab982aee807b65ecbc1a6ea82b6657bb0e (diff) | |
download | bot-games-d03fe696ce25af4efd63d5a1d2888e5c3d7b12fe.tar.gz bot-games-d03fe696ce25af4efd63d5a1d2888e5c3d7b12fe.zip |
make is_over work properly as a command
-rw-r--r-- | lib/Bot/Games.pm | 1 | ||||
-rw-r--r-- | lib/Bot/Games/Game.pm | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 6bc5023..cd2d24f 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -85,6 +85,7 @@ sub said { && (!defined($action) || $action !~ /^-/)) { $self->$say($game->init($args->{who})) if $game->can('init'); $self->done_init->{$game_name} = 1; + $self->active_games->{$game_name}->is_over(0); } return unless defined $action; diff --git a/lib/Bot/Games/Game.pm b/lib/Bot/Games/Game.pm index f70f5c7..4b848be 100644 --- a/lib/Bot/Games/Game.pm +++ b/lib/Bot/Games/Game.pm @@ -48,7 +48,9 @@ has last_turn_time => ( has is_over => ( is => 'rw', isa => 'Bool', + default => 1, command => 1, + needs_init => 0, ); sub turn { |