From d9b7b0de319a063064caac315ae163574160c0fd Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 1 Jan 2015 16:42:50 +0100 Subject: Do not start a game with more than the maximum number of players --- Avalon.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Avalon.pm b/Avalon.pm index 0d60734..a0c92d0 100644 --- a/Avalon.pm +++ b/Avalon.pm @@ -90,6 +90,7 @@ sub start_game { my $self = shift; my $av = $self->{avalon}; my @players = shuffle keys $av->{registered}; + @players = @players[0..9] if scalar @players > 10; $av->{players} = \@players; $self->say( channel => $av->{config}->{'game.channel'}, body => "GAMESTART " . join(' ', @players) ); $self->set_timeout(10); -- cgit v1.2.3