Skip to content

Commit

Permalink
Help: add support for unlisted help
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Dec 5, 2019
1 parent bf504cc commit 0a1d463
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Synergy/Reactor/Help.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ sub handle_help ($self, $event) {
my @help = map {; $_->help_entries->@* } $self->hub->reactors;

unless ($rest) {
my $help_str = join q{, }, uniq sort map {; $_->{title} } @help;
my $help_str = join q{, }, uniq sort map {; $_->{title} }
grep {; ! $_->{unlisted} } @help;

$event->error_reply(qq{You can say "help TOPIC" for help on a topic. }
. qq{Here are topics I know about: $help_str});
return;
Expand Down
1 change: 1 addition & 0 deletions lib/Synergy/Reactor/TimeClock.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ sub listener_specs {
{
title => 'clock off',
text => 'see *clock out*',
unlisted => 1,
},
],
};
Expand Down

0 comments on commit 0a1d463

Please sign in to comment.