diff options
author | doy <doy@tozt.net> | 2009-01-25 02:37:35 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-25 02:37:35 -0500 |
commit | efb9aefaccfe585784063995714904854beb60cf (patch) | |
tree | 1a3a565032ccb032d5465d63a5b63fbc365f104d /lib/Bot/Games.pm | |
parent | d9eeef50ec74526248551a80dc9df665f22f1059 (diff) | |
download | bot-games-efb9aefaccfe585784063995714904854beb60cf.tar.gz bot-games-efb9aefaccfe585784063995714904854beb60cf.zip |
don't output the return value of $game->turn if it returns ''
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r-- | lib/Bot/Games.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 5e84fd4..8dfe257 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -82,7 +82,11 @@ sub said { } } else { - $say->($game->turn($args->{who}, $action)); + # XXX: need better handling for "0", but B::BB doesn't currently + # handle that properly either, so + # also, this should probably be factored into $say, i think? + my $turn = $game->turn($args->{who}, $action); + $say->($turn) if $turn; } if (my $end_msg = $game->is_over) { |