diff options
author | doy <doy@tozt.net> | 2009-01-26 00:33:03 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-26 00:33:03 -0500 |
commit | 0e17b4bc3a35dde33afba383f24214f5473ed7a2 (patch) | |
tree | 752c2f4cec1036ebc3f529554cc122ef816f1268 /lib/Bot/Games.pm | |
parent | d78a95c3ab2ad229b51224a541695ee122e83857 (diff) | |
download | bot-games-0e17b4bc3a35dde33afba383f24214f5473ed7a2.tar.gz bot-games-0e17b4bc3a35dde33afba383f24214f5473ed7a2.zip |
game_list should just return the array, let said() do the formatting
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r-- | lib/Bot/Games.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 44989c5..dcc4671 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -71,7 +71,8 @@ sub said { return if $args->{channel} eq 'msg'; return unless $args->{body} =~ /^$prefix(\w+)(?:\s+(.*))?/; my ($game_name, $action) = (lc($1), $2); - return $self->game_list if $game_name eq 'games'; + return join ' ', map { $self->prefix . $_} $self->game_list + if $game_name eq 'games'; if ($game_name eq 'help') { $game_name = $action; $game_name =~ s/^-//; @@ -144,8 +145,7 @@ sub game_package { sub game_list { my $self = shift; - return join ' ', sort map { s/Bot::Games::Game:://; $self->prefix . lc } - $self->games; + return sort map { s/Bot::Games::Game:://; lc } $self->games; } sub find_game { |