diff options
author | doy <doy@tozt.net> | 2009-01-24 01:24:23 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-24 01:24:23 -0500 |
commit | 84edd7dca442e498f0898e4ce1ddcd227a41b1b1 (patch) | |
tree | bbdd5e684e41d433793411da795d0ef2621eee62 | |
parent | 85f894a1aa35d771e0232c6e44850b9b6a9c5dcf (diff) | |
download | bot-games-84edd7dca442e498f0898e4ce1ddcd227a41b1b1.tar.gz bot-games-84edd7dca442e498f0898e4ce1ddcd227a41b1b1.zip |
don't always format, that catches unintentional undef returns
-rw-r--r-- | lib/Bot/Games.pm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index b2d0f2d..a1dce91 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -54,13 +54,14 @@ sub said { else { $output = $game->$action; } + $output = $self->_format($output); } else { $output = "Unknown command $action for game $game_name"; } } else { - $output = $game->turn($args->{who}, $action); + $output = $self->_format($game->turn($args->{who}, $action)); } if (my $end_msg = $game->is_over) { @@ -71,11 +72,6 @@ sub said { } return $output; } -around said => sub { - my $orig = shift; - my $self = shift; - return $self->_format($self->$orig(@_)); -}; sub valid_game { my $self = shift; |