diff options
author | doy <doy@tozt.net> | 2009-01-15 21:11:20 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-15 21:11:20 -0500 |
commit | 2b478c9e0291e6dc676c654d45098936f0a924cb (patch) | |
tree | 24d2f776d208ebee597ba4560b08cce3f5f14c85 /lib/Bot/Games.pm | |
parent | 4f4afc2b22add8c0cbf374fe8b1926393d74b70f (diff) | |
download | bot-games-2b478c9e0291e6dc676c654d45098936f0a924cb.tar.gz bot-games-2b478c9e0291e6dc676c654d45098936f0a924cb.zip |
make Command into a default method metaclass role, and turn the check for whether or not a method is a command into an attribute on the method metaclass
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r-- | lib/Bot/Games.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 40028fb..854b629 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -46,7 +46,8 @@ sub said { my ($action, $arg) = ($1, $2); my $method_meta = $game->meta->find_method_by_name($action); if (blessed $method_meta - && $method_meta->does('Bot::Games::Meta::Role::Command')) { + && $method_meta->does('Bot::Games::Meta::Role::Command') + && $method_meta->command) { $output = $game->$action($arg, {player => $args->{who}}); } else { |