diff options
author | doy <doy@tozt.net> | 2009-01-25 22:18:06 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-25 22:18:06 -0500 |
commit | 5504034bbb082d91fcfa1662c8e32c3b33865749 (patch) | |
tree | 68618a4bd6e982d329a89b51618836912c875f50 | |
parent | d5d7a9d1c72e331e09a717204db80f9d3fdbe618 (diff) | |
download | bot-games-5504034bbb082d91fcfa1662c8e32c3b33865749.tar.gz bot-games-5504034bbb082d91fcfa1662c8e32c3b33865749.zip |
sort the lists of games and commands
-rw-r--r-- | lib/Bot/Games.pm | 4 | ||||
-rw-r--r-- | lib/Bot/Games/Game.pm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 3e8394a..52be3a9 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -133,8 +133,8 @@ sub game_package { sub game_list { my $self = shift; - return join ' ', map { s/Bot::Games::Game:://; $self->prefix . lc } - $self->games; + return join ' ', sort map { s/Bot::Games::Game:://; $self->prefix . lc } + $self->games; } sub _format { diff --git a/lib/Bot/Games/Game.pm b/lib/Bot/Games/Game.pm index 2bc467c..bba2b16 100644 --- a/lib/Bot/Games/Game.pm +++ b/lib/Bot/Games/Game.pm @@ -60,7 +60,7 @@ command cmdlist => sub { if $method->meta->can('does_role') && $method->meta->does_role('Bot::Games::Meta::Role::Command'); } - return join ' ', map { '-' . $_ } @commands; + return join ' ', sort map { '-' . $_ } @commands; }, needs_init => 0; # this happens in Bot::Games, since we want to add the say method from there |