From 685d9c323356d0c62ba61950dd8cb1e48f1abcad Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Sat, 16 Aug 2003 19:45:43 +0000 Subject: [PATCH] make help module give the topics for that module. fixes bug 145369. --- webtools/mozbot/BotModules/General.bm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webtools/mozbot/BotModules/General.bm b/webtools/mozbot/BotModules/General.bm index 318ffdff873a..a39c9a1d69fc 100644 --- a/webtools/mozbot/BotModules/General.bm +++ b/webtools/mozbot/BotModules/General.bm @@ -41,8 +41,13 @@ sub Told { foreach my $module (@modules) { my $commands = $module->Help($event); if ($commands->{''}) { + my @commands = grep { /./os } keys %$commands; $topicList{lc($module->{'_name'})} = [] unless defined($topicList{lc($module->{'_name'})}); push(@{$topicList{lc($module->{'_name'})}}, $commands->{''}); + if (@commands) { + local $" = ', '; + push(@{$topicList{lc($module->{'_name'})}}, "The $module->{'_name'} module has the following help topics: @commands"); + } } foreach (keys %$commands) { $topicList{lc($_)} = [] unless defined($topicList{lc($_)});