From 0a1d463db85e814a077e69032873bfc5857dd73c Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Thu, 5 Dec 2019 12:50:35 -0500 Subject: [PATCH] Help: add support for unlisted help --- lib/Synergy/Reactor/Help.pm | 4 +++- lib/Synergy/Reactor/TimeClock.pm | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Synergy/Reactor/Help.pm b/lib/Synergy/Reactor/Help.pm index 7ac21e2f..6975a34c 100644 --- a/lib/Synergy/Reactor/Help.pm +++ b/lib/Synergy/Reactor/Help.pm @@ -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; diff --git a/lib/Synergy/Reactor/TimeClock.pm b/lib/Synergy/Reactor/TimeClock.pm index a74bfd99..fb633010 100644 --- a/lib/Synergy/Reactor/TimeClock.pm +++ b/lib/Synergy/Reactor/TimeClock.pm @@ -33,6 +33,7 @@ sub listener_specs { { title => 'clock off', text => 'see *clock out*', + unlisted => 1, }, ], };