X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=1c581b5fdc12d48a1430d608fda77529077aa8e6;hb=2d1175b409d790f991091e8f2884d26591021b9a;hp=080cf666ce0cbc3dc99032bbc4a1d9452af24bd1;hpb=be05d6ea96d1b9bd023900eab7ec5d119d99853a;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 080cf666..1c581b5f 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -41,7 +41,8 @@ use Thingy::Hello; use Thingy::Bye; 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 @@ -51,6 +52,8 @@ $scriptbase = "$main::root/scripts"; # the place where all users start scripts g $maxerrors = 20; # the maximum number of concurrent errors allowed before disconnection $maxbadcount = 3; # no of bad words allowed before disconnection $msgpolltime = 3600; # the time between polls for new messages +$default_pagelth = 20; # the default page length 0 = unlimited + use vars qw($VERSION $BRANCH); @@ -96,7 +99,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