Fixed some Aliasing problems.
[spider.git] / perl / DXProt.pm
index d6a81ec4328ff0e4d8db67eda6010474df64bca2..ee9c92f103410f54bfc3c78d20c764fc8085b71d 100644 (file)
@@ -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;
                        }
@@ -957,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 {
@@ -1769,7 +1774,7 @@ sub talk
        
        $line =~ s/\^/\\5E/g;                   # remove any ^ characters
        $self->send(DXProt::pc10($from, $to, $via, $line, $origin));
-       Log('talk', $self->call, $from, $via?$via:$main::mycall, $line) unless $origin && $origin ne $main::mycall;
+       Log('talk', $to, $from, $via?$via:$self->call, $line) unless $origin && $origin ne $main::mycall;
 }
 
 # send it if it isn't the except list and isn't isolated and still has a hop count