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.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index 654f288..ad65db8 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -77,6 +77,10 @@ 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;
+ }
$self->$say($method_meta->execute($game, $arg,
{player => $args->{who}}));
}