summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r--lib/Bot/Games.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index ad65db8..f981c27 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -77,9 +77,9 @@ sub said {
# XXX: maybe the meta stuff should get pushed out into the plugins
# themselves, and this should become $game->meta->get_command or so?
if (my $method_meta = _get_command($game, $action)) {
- if ($method_meta->needs_init) {
- $self->$say($game->init($args->{who})) if $game->can('init');
- $self->done_init->{$game_name} = 1;
+ if ($method_meta->needs_init && !$self->done_init->{$game_name}) {
+ $self->$say("Game $game_name hasn't started yet!");
+ return;
}
$self->$say($method_meta->execute($game, $arg,
{player => $args->{who}}));