From 6975c4b4c8b210af067efab767bc1656786f70f2 Mon Sep 17 00:00:00 2001 From: djk Date: Thu, 18 Nov 1999 19:32:45 +0000 Subject: [PATCH] fixed talk --- cmd/ping.pl | 4 +++- perl/DXProt.pm | 5 +++-- perl/DXUser.pm | 5 +++++ perl/Messages | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/ping.pl b/cmd/ping.pl index bf88cc5b..1d75a826 100644 --- a/cmd/ping.pl +++ b/cmd/ping.pl @@ -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)); diff --git a/perl/DXProt.pm b/perl/DXProt.pm index c14c9bbe..9888380a 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -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; diff --git a/perl/DXUser.pm b/perl/DXUser.pm index 50cb4796..58cb1afc 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -354,5 +354,10 @@ sub wantdx return _want('dx', @_); } +sub wanttalk +{ + return _want('talk', @_); +} + 1; __END__ diff --git a/perl/Messages b/perl/Messages index 5a4995e3..71bbb425 100644 --- a/perl/Messages +++ b/perl/Messages @@ -116,7 +116,7 @@ package DXM; passerr => 'Please use: SET/PASS ', 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 ', 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]', -- 2.43.0