X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fhelp.pl;h=d87de98113d6fc84829dd08619cedbd592dc307e;hb=0e84728de35d2dadbb9d624614a471b68ae9eef6;hp=cf3dbd8b5a9e25a65f7e81c04bd596e060df8355;hpb=16b9415f38bf1b7eab1a9d2dc72abce9a643be09;p=spider.git diff --git a/cmd/help.pl b/cmd/help.pl index cf3dbd8b..d87de981 100644 --- a/cmd/help.pl +++ b/cmd/help.pl @@ -14,7 +14,7 @@ my ($self, $line) = @_; my @out; # this is naff but it will work for now -$line = "help" if !$line; +$line = "help" unless $line; my $lang = $self->lang; $lang = 'en' if !$lang; @@ -59,7 +59,7 @@ foreach $in (<$h>) { $in =~ s/=== //; my ($priv, $cmd, $desc) = split /\^/, $in; next if $priv > $self->priv; # ignore subcommands that are of no concern - next unless $cmd =~ /$line/i; + next unless $cmd =~ /^$line/i; push @out, "$cmd $desc" unless $cmd =~ /-$/o; $state = 1; next;