]> dxcluster.net Git - spider.git/commitdiff
prevent self pinging
authordjk <djk>
Fri, 19 Nov 1999 01:25:44 +0000 (01:25 +0000)
committerdjk <djk>
Fri, 19 Nov 1999 01:25:44 +0000 (01:25 +0000)
altered no of pings to take into account to 6 from 10

cmd/ping.pl
perl/DXProt.pm
perl/Messages

index 1d75a8263d9c035fa4b5f0ecb5be97a6e5fc930c..9447b67b6f055e652da0fd1d39161aa10dba0015 100644 (file)
@@ -16,6 +16,9 @@ return (1, $self->msg('e5')) if $self->priv < 1;
 # is there a call?
 return (1, $self->msg('e6')) if !$call;
 
+# is it me?
+return (1, $self->msg('pinge1')) if $call eq $main::mycall;
+
 # can we see it? Is it a node?
 my $noderef = DXCluster->get_exact($call);
 $noderef = DXChannel->get($call) unless $noderef;
index b4ff5f655f4701be2edcb151be015d5233b6c6cb..486cfa95f6226f65422be3e09736c150bb7434ea 100644 (file)
@@ -718,7 +718,7 @@ sub normal
                                                                if ($tochan) {
                                                                        $tochan->nopings(3); # pump up the timer
                                                                        push @{$tochan->pingtime}, $t;
-                                                                       shift @{$tochan->pingtime} if @{$tochan->pingtime} > 10;
+                                                                       shift @{$tochan->pingtime} if @{$tochan->pingtime} > 6;
                                                                        my $st;
                                                                        for (@{$tochan->pingtime}) {
                                                                                $st += $_;
index 6a49c2aff7bffcd1c8eda3bbcee4155cbea65837..570e4e7580d50375f4c218ea629f5ef95b189439 100644 (file)
@@ -119,6 +119,7 @@ package DXM;
                                password => 'Password set or changed for $_[0]',
                                pingo => 'Ping Started to $_[0]',
                                pingi => 'Ping Returned from $_[0] $_[1] (Ave $_[2]) secs',
+                               pinge1 => 'Cannot ping yourself!',
                                pr => '$_[0] de $main::mycall $main::cldate $main::ztime >',
                                pr2 => '($_[0]) de $main::mycall $main::cldate $main::ztime >',
                                priv => 'Privilege level changed on $_[0]',