X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=3c4b49f3d7d344fc1dc83825402d45beeed06cfd;hb=770092d94f96b6d22a38fb33e0056b4779a8a1ab;hp=09ab54512c6a2a231527ad18d1225c12237f0c2b;hpb=210ee86709c6be18a86b37201a82ef526ac85510;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 09ab5451..3c4b49f3 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -33,6 +33,7 @@ use Route; use Route::Node; use Script; use DXProtHandle; +use DXCIDR; use strict; @@ -246,8 +247,9 @@ sub init $main::me->{pingave} = 0; $main::me->{registered} = 1; $main::me->{version} = $main::version; - $main::me->{build} = "$main::subversion.$main::build"; + $main::me->{build} = $main::build; $main::me->{do_pc9x} = 1; + $main::me->{hostname} = $main::clusteraddr; $main::me->update_pc92_next($pc92_short_update_period); $main::me->update_pc92_keepalive; } @@ -288,7 +290,9 @@ sub start # log it my $host = $self->{conn}->peerhost; $host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport}; + $host ||= $host if is_ipaddr($host); $host ||= "unknown"; + $self->{hostname} = $host; Log('DXProt', "$call connected from $host"); @@ -430,9 +434,9 @@ sub normal my $sub = "handle_$pcno"; if ($self->can($sub)) { - $self->$sub($pcno, $line, $origin, @field); + $self->$sub($pcno, $line, $origin, \@field); } else { - $self->handle_default($pcno, $line, $origin, @field); + $self->handle_default($pcno, $line, $origin, \@field); } } @@ -553,6 +557,8 @@ sub send_dx_spot foreach $dxchan (@dxchan) { next if $dxchan == $main::me; next if $dxchan == $self && $self->is_node; + next if $dxchan == $self; + if ($line =~ /PC61/ && !($dxchan->is_spider || $dxchan->is_user)) { unless ($pc11) { my @f = split /\^/, $line;