projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
slug the not here messages so they can't loopback
[spider.git]
/
cmd
/
help.pl
diff --git
a/cmd/help.pl
b/cmd/help.pl
index d87de98113d6fc84829dd08619cedbd592dc307e..51dfa930a413d56e9e2900b10927dd5068fa602a 100644
(file)
--- a/
cmd/help.pl
+++ b/
cmd/help.pl
@@
-14,7
+14,6
@@
my ($self, $line) = @_;
my @out;
# this is naff but it will work for now
my @out;
# this is naff but it will work for now
-$line = "help" unless $line;
my $lang = $self->lang;
$lang = 'en' if !$lang;
my $lang = $self->lang;
$lang = 'en' if !$lang;
@@
-35,16
+34,18
@@
$lang = 'en' if !$lang;
my $h = new IO::File;
if (!open($h, "$main::localcmd/Commands_$lang.hlp")) {
my $h = new IO::File;
if (!open($h, "$main::localcmd/Commands_$lang.hlp")) {
+ $lang = 'en';
if (!open($h, "$main::cmd/Commands_$lang.hlp")) {
return (1, $self->msg('helpe1'));
}
}
my $in;
if (!open($h, "$main::cmd/Commands_$lang.hlp")) {
return (1, $self->msg('helpe1'));
}
}
my $in;
-$line =~ s/![\w\/]//og;
-$line =~ s/\//\.\*\//og;
-$line =~ s/^\s+//og;
-$line =~ s/\s+$//og;
+$line =~ s/[^\w\/]//g;
+$line =~ s/\//\.\*\//g;
+$line =~ s/^\s+//g;
+$line =~ s/\s+$//g;
+$line = "help" if $line =~ /^\s*$/;
# sort out aliases
my $alias = CmdAlias::get_hlp($line);
# sort out aliases
my $alias = CmdAlias::get_hlp($line);