From efb9aefaccfe585784063995714904854beb60cf Mon Sep 17 00:00:00 2001 From: doy Date: Sun, 25 Jan 2009 02:37:35 -0500 Subject: don't output the return value of $game->turn if it returns '' --- lib/Bot/Games.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Bot/Games.pm') 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) { -- cgit v1.2.3-54-g00ecf