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.pm13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index 653e9da..ef61c5f 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -84,9 +84,7 @@ sub said {
if ($action =~ /^-(\w+)\s*(.*)/) {
my ($action, $arg) = ($1, $2);
- # 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 (my $method_meta = $game->meta->get_command($action)) {
if ($method_meta->needs_init
&& !$self->active_games->{$game_name}->is_active) {
$self->$say("Game $game_name hasn't started yet!");
@@ -147,15 +145,6 @@ sub find_game {
return;
}
-sub _get_command {
- my ($game, $action) = @_;
- my $method_meta = $game->meta->find_method_by_name($action);
- return $method_meta
- if blessed($method_meta)
- && $method_meta->meta->can('does_role')
- && $method_meta->meta->does_role('Bot::Games::Trait::Method::Command');
-}
-
__PACKAGE__->meta->make_immutable(inline_constructor => 0);
no Bot::Games::OO;