X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=01395c9052a52c429b2a27e547b608a575294689;hb=606b9690c7bb9e293cb4a03507f0280eea05d9ce;hp=8ed74de4f256ff0c639a232a0463a3f09638fa31;hpb=cc49b8f8c2ec3a975c7ace3f5bd8679580288406;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 8ed74de4..01395c90 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -167,7 +167,7 @@ sub start $self->send_motd; # sort out privilege reduction - $self->{priv} = 0 unless $self->{hostname} eq '127.0.0.1' || $self->{hostname} eq '::1' || $self->conn->{usedpasswd}; + $self->{priv} = 0 unless $self->{hostname} eq '127.0.0.1' || $self->conn->peerhost eq '127.0.0.1' || $self->{hostname} eq '::1' || $self->conn->{usedpasswd}; # get the filters my $nossid = $call; @@ -406,7 +406,7 @@ sub normal } # check for excessive swearing - if ($self->{badcount} && $self->{badcount} >= $maxbadcount) { + if ($maxbadcount && $self->{badcount} && $self->{badcount} >= $maxbadcount) { LogDbg('DXCommand', "$self->{call} logged out for excessive swearing"); $self->disconnect; return;