]> dxcluster.org Git - spider.git/commitdiff
fixed talk
authordjk <djk>
Thu, 18 Nov 1999 19:32:45 +0000 (19:32 +0000)
committerdjk <djk>
Thu, 18 Nov 1999 19:32:45 +0000 (19:32 +0000)
cmd/ping.pl
perl/DXProt.pm
perl/DXUser.pm
perl/Messages

index bf88cc5bdcd50a89ac91e8c814f056c3dc6dd7fa..1d75a8263d9c035fa4b5f0ecb5be97a6e5fc930c 100644 (file)
@@ -18,11 +18,13 @@ return (1, $self->msg('e6')) if !$call;
 
 # can we see it? Is it a node?
 my $noderef = DXCluster->get_exact($call);
+$noderef = DXChannel->get($call) unless $noderef;
+
 return (1, $self->msg('e7', $call)) if !$noderef || !$noderef->pcversion;
 
 # ping it
 DXProt::addping($self->call, $call);
 
-return (1, $self->msg('pingo', $call, atime($main::systime)));
+return (1, $self->msg('pingo', $call));
 
 
index c14c9bbefdc64879402412bac78f826e2a6ff374..9888380adcad3fe9d1e8fb7a86dd4019e90327df 100644 (file)
@@ -703,6 +703,7 @@ sub normal
                                        # it's a reply, look in the ping list for this one
                                        my $ref = $pings{$field[2]};
                                        if ($ref) {
+                                               my $tochan =  DXChannel->get($field[2]);
                                                while (@$ref) {
                                                        my $r = shift @$ref;
                                                        my $dxchan = DXChannel->get($r->{call});
@@ -710,9 +711,9 @@ sub normal
                                                        my $t = tv_interval($r->{t}, [ gettimeofday ]);
                                                        if ($dxchan->is_user) {
                                                                my $s = sprintf "%.2f", $t; 
-                                                               $dxchan->send($dxchan->msg('pingi', $field[2], $s))
+                                                               my $ave = $tochan->pingave if $tochan;
+                                                               $dxchan->send($dxchan->msg('pingi', $field[2], $s, $ave))
                                                        } elsif ($dxchan->is_ak1a) {
-                                                               my $tochan =  DXChannel->get($field[2]);
                                                                if ($tochan) {
                                                                        $tochan->nopings(3); # pump up the timer
                                                                        $tochan->{pingtime} += $t;
index 50cb4796d1e732df106071de8179947201c6c5b4..58cb1afcabf39b5abd6c4ab0f2d4483a2d41fcd0 100644 (file)
@@ -354,5 +354,10 @@ sub wantdx
        return _want('dx', @_);
 }
 
+sub wanttalk
+{
+       return _want('talk', @_);
+}
+
 1;
 __END__
index 5a4995e39353c0b3e7611073af57c1dbcc08b17c..71bbb425fb751c1ce7ff9454e960a86c7c6aab0b 100644 (file)
@@ -116,7 +116,7 @@ package DXM;
                                passerr => 'Please use: SET/PASS <password> <callsign>',
                                password => 'Password set or changed for $_[0]',
                                pingo => 'Ping Started to $_[0]',
-                               pingi => 'Ping Returned from $_[0] ($_[1] secs)',
+                               pingi => 'Ping Returned from $_[0] $_[1] (Ave $_[2]) secs',
                                pr => '$_[0] de $main::mycall $main::cldate $main::ztime >',
                                pr2 => '($_[0]) de $main::mycall $main::cldate $main::ztime >',
                                priv => 'Privilege level changed on $_[0]',
@@ -220,7 +220,7 @@ package DXM;
                 passerr => 'Gebruik: SET/PASS <wachtwoord> <call>',
                 password => 'Wachtwoord gezet of gewijzigd voor $_[0]',
                 pingo => 'Ping gestart naar $_[0]',
-                pingi => 'Ping ontvangen van $_[0] ($_[1] secs)',
+                pingi => 'Ping ontvangen van $_[0] $_[1] (Ave $_[2]) secs',
                 pr => '$_[0] de $main::mycall $main::cldate $main::ztime >',
                 pr2 => '($_[0]) de $main::mycall $main::cldate $main::ztime >',
                 priv => 'Privilege level gewijzigd op $_[0]',