X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=411b33b456bf1986abf705386f68d1415cf57f75;hb=579810d363939640538f88a9caa86e01fe9c7709;hp=f8e2b4b99ee9d0c85c1f1a8d75880fde8f5b6b0c;hpb=aaf98478dc930b9d337c85c41316a926046d7ae2;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index f8e2b4b9..411b33b4 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -238,6 +238,9 @@ sub start $self->{here} = 1; $self->{width} = 80; + # sort out registration + $self->{registered} = 1; + # get the output filters $self->{spotsfilter} = Filter::read_in('spots', $call, 0) || Filter::read_in('spots', 'node_default', 0); $self->{wwvfilter} = Filter::read_in('wwv', $call, 0) || Filter::read_in('wwv', 'node_default', 0); @@ -256,6 +259,7 @@ sub start # set unbuffered and no echo $self->send_now('B',"0"); $self->send_now('E',"0"); + $self->conn->echo(0) if $self->conn->can('echo'); # ping neighbour node stuff my $ping = $user->pingint; @@ -415,7 +419,7 @@ sub normal } # is it 'baddx' - if ($baddx->in($field[2])) { + if ($baddx->in($field[2]) || BadWords::check($field[2]) || $field[2] =~ /COCK/) { dbg("PCPROT: Bad DX spot, ignored") if isdbg('chanerr'); return; } @@ -825,20 +829,21 @@ sub normal $self->disconnect; return; } - my $node = Route::Node::get($call); if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me! - my $dxchan = $node->dxchan; - if ($dxchan && $dxchan ne $self) { - dbg("PCPROT: PC21 from $self->{call} trying to alter locally connected $call, ignored!") if isdbg('chanerr'); - return; - } - if ($call eq $self->{call}) { dbg("PCPROT: Trying to disconnect myself with PC21") if isdbg('chanerr'); return; } + my $node = Route::Node::get($call); if ($node) { + + my $dxchan = $node->dxchan; + if ($dxchan && $dxchan ne $self) { + dbg("PCPROT: PC21 from $self->{call} trying to alter locally connected $call, ignored!") if isdbg('chanerr'); + return; + } + # input filter it return unless $self->in_filter_route($node); @@ -956,6 +961,7 @@ sub normal } if (($pcno >= 28 && $pcno <= 33) || $pcno == 40 || $pcno == 42 || $pcno == 49) { # mail/file handling + return if $pcno == 49 && eph_dup($line); if ($pcno == 49 || $field[1] eq $main::mycall) { DXMsg::process($self, $line); } else {