From: djk Date: Mon, 22 Nov 1999 20:16:36 +0000 (+0000) Subject: changed pc50 logic X-Git-Tag: R_1_36~5 X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=3784e03cd598b7f540fb849a533b7589867a066a;p=spider.git changed pc50 logic --- diff --git a/Changes b/Changes index fe846fcb..37ea213d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ 21Nov99======================================================================= 1. lose extraneous rubbish after the callsign as sent by BBSes. +2. Change end label on sh/moon to RGain dB rather than Loss dB. +3. Remove spurious call to DXCluster->get_exact in pc50. +4. Allow rcmd to locally connected nodes that are not in the nodes table. 20Nov99======================================================================= 1. Added set/unset logininfo which will tell anybody that has this set when someone has either logged in or out of this node. diff --git a/cmd/Aliases b/cmd/Aliases index 6d384b7c..338a8098 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -23,7 +23,7 @@ package CmdAlias; %alias = ( '?' => [ - '^\?', 'apropos help', 'apropos', + '^\?', 'apropos', 'apropos', ], 'a' => [ '^ann.*/full', 'announce full', 'announce', diff --git a/cmd/rcmd.pl b/cmd/rcmd.pl index caa9fb83..11a8caf5 100644 --- a/cmd/rcmd.pl +++ b/cmd/rcmd.pl @@ -14,7 +14,7 @@ my ($call) = $line =~ /^\s*(\S+)/; return (1, $self->msg('e5')) if $self->priv < 6; # is there a call? -return (1, $self->msg('e6')) if !$call; +return (1, $self->msg('e6')) unless $call; # remove the callsign from the line $line =~ s/^\s*$call\s+//; @@ -22,9 +22,13 @@ $line =~ s/^\s*$call\s+//; # can we see it? Is it a node? $call = uc $call; my $noderef = DXCluster->get_exact($call); -return (1, $self->msg('e7', $call)) if !$noderef || !$noderef->pcversion; +unless ($noderef) { + $noderef = DXChannel->get($call); + $noderef = undef unless $noderef && $noderef->is_ak1a; +} +return (1, $self->msg('e7', $call)) unless $noderef; -# ping it +# rcmd it DXProt::addrcmd($self->call, $call, $line); return (1, $self->msg('rcmdo', $line, $call)); diff --git a/cmd/show/moon.pl b/cmd/show/moon.pl index d26a9653..b1e4feb4 100644 --- a/cmd/show/moon.pl +++ b/cmd/show/moon.pl @@ -48,7 +48,7 @@ push @out, $self->msg('moon'); foreach $l (@in) { my ($rise, $set, $az, $dec, $loss )=Sun::rise_set($yr,$month,$day,$hr,$min,$l->[1],$l->[2],1); $l->[3] =~ s{(-\d+|/\w+)$}{}; - push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f %3.1f", $l->[3], $l->[0], $rise, $set, $az, $dec, $loss); + push @out,sprintf("%-6.6s %-30.30s %s %s %6.1f %6.1f %3.1f", $l->[3], $l->[0], $rise, $set, $az, $dec, $loss); } diff --git a/perl/DXProt.pm b/perl/DXProt.pm index efe969b4..61e72661 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -776,7 +776,7 @@ sub process # send a pc50 out on this channel if ($t >= $dxchan->pc50_t + $DXProt::pc50_interval) { - $dxchan->send(pc50()); + $dxchan->send(pc50(scalar DXChannel::get_all_users)); $dxchan->pc50_t($t); } diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 887e0dcb..ee761cdc 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -305,8 +305,8 @@ sub pc49 # periodic update of users, plus keep link alive device (always H99) sub pc50 { - my $me = DXCluster->get_exact($main::mycall); - my $n = $me->users ? $me->users : '0'; + my $n = shift; + $n = 0 unless $n >= 0; return "PC50^$main::mycall^$n^H99^"; } diff --git a/perl/Messages b/perl/Messages index ded87db7..6a33b1ef 100644 --- a/perl/Messages +++ b/perl/Messages @@ -109,7 +109,7 @@ package DXM; msg3 => 'Msg $_[0]: $_[1] changed from $_[2] to $_[3]', msgu => 'usage: msg data...', merge1 => 'Merge request for $_[1] spots and $_[2] WWV sent to $_[0]', - moon => 'Location Rise Set Azim Elev RGain dB', + moon => 'Location Rise Set Azim Elev RGain dB', namee1 => 'Please enter your name, set/name ', namee2 => 'Can\'t find user $_[0]!', name => 'Your name is now \"$_[0]\"',