X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=79ba03b0b8f63ac3f189534677f9d4d55cb7c5e2;hb=d3004b59ca0171c0afe6d9898c84830c809721af;hp=6b62f58a820f02d1215f7b7decd1054300ad0ec0;hpb=be587fd8dade028c10545ffff4be13b0a18f3f91;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 6b62f58a..79ba03b0 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -37,7 +37,8 @@ use DB_File; use VE7CC; use strict; -use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug $maxbadcount $msgpolltime); +use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug + $maxbadcount $msgpolltime $default_pagelth); %Cache = (); # cache of dynamically loaded routine's mod times %cmd_cache = (); # cache of short names @@ -97,7 +98,9 @@ sub start $self->state('prompt'); # a bit of room for further expansion, passwords etc $self->{priv} = $user->priv || 0; $self->{lang} = $user->lang || $main::lang || 'en'; - $self->{pagelth} = $user->pagelth || 20; + my $pagelth = $user->pagelth; + $pagelth = $default_pagelth unless defined $pagelth; + $self->{pagelth} = $pagelth; ($self->{width}) = $line =~ /width=(\d+)/; $line =~ s/\s*width=\d+\s*//; $self->{width} = 80 unless $self->{width} && $self->{width} > 80; $self->{consort} = $line; # save the connection type @@ -436,7 +439,7 @@ sub run_cmd # strip out // on command only $cmd =~ s|//|/|g; $cmd =~ s|^/||g; # no leading / either - $cmd =~ s|[^-\w/]||g; # and no funny characters either + $cmd =~ s|[^-?\w/]||g; # and no funny characters either my ($path, $fcmd);