From: djk Date: Sat, 17 Jun 2000 23:30:05 +0000 (+0000) Subject: Added node type to links and who X-Git-Tag: R_1_42~7 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=aba7a0d5b7287daac0d3b708aa222247a2e87e86;p=spider.git Added node type to links and who --- diff --git a/Changes b/Changes index 795bc107..32d3844b 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ 2. Added G0RDI's 'links' command. 3. added update_sysop.pl which cleans out all previous versions of the sysops information from the user database and recreates it with that in DXVars.pm +4. Added node type to links and who 14Jun00======================================================================= 1. fixed sh/node crash 2. fixed RTT in who.pl diff --git a/cmd/links.pl b/cmd/links.pl index 456ea72f..017d6119 100644 --- a/cmd/links.pl +++ b/cmd/links.pl @@ -7,22 +7,27 @@ # # 16-Jun-2000 # $Id: links.pl - +# my $self = shift; my $dxchan; my @out; -push @out, " Callsign Started Ave RTT"; +push @out, " Callsign Type Started Ave RTT"; foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_ak1a ) { my $call = $dxchan->call(); my $t = cldatetime($dxchan->startt); + my $sort; my $name = $dxchan->user->name || " "; my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%8.2f", $dxchan->pingave) : ""; - push @out, sprintf "%10s $t %-6.6s $ping", $call; - + $sort = "DXSP" if $dxchan->is_spider; + $sort = "CLX " if $dxchan->is_clx; + $sort = "DXNT" if $dxchan->is_dxnet; + $sort = "AR-C" if $dxchan->is_arcluster; + $sort = "AK1A" if $dxchan->is_ak1a; + push @out, sprintf "%10s $sort $t $ping", $call; } return (1, @out) diff --git a/cmd/who.pl b/cmd/who.pl index c5d665d0..8bd69e80 100644 --- a/cmd/who.pl +++ b/cmd/who.pl @@ -11,15 +11,23 @@ my $self = shift; my $dxchan; my @out; -push @out, " Callsign Type Started Name Ave RTT"; +push @out, " Callsign Type Started Name Ave RTT"; foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) { my $call = $dxchan->call(); my $t = cldatetime($dxchan->startt); - my $sort = $dxchan->is_node ? "NODE" : "USER"; + my $type = $dxchan->is_node ? "NODE" : "USER"; + my $sort = " "; + if ($dxchan->is_node) { + $sort = "DXSP" if $dxchan->is_spider; + $sort = "CLX " if $dxchan->is_clx; + $sort = "DXNT" if $dxchan->is_dxnet; + $sort = "AR-C" if $dxchan->is_arcluster; + $sort = "AK1A" if $dxchan->is_ak1a; + } my $name = $dxchan->user->name || " "; my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%8.2f", $dxchan->pingave) : ""; - push @out, sprintf "%10s $sort $t %-18.18s $ping", $call, $name; + push @out, sprintf "%10s $type $sort $t %-18.18s $ping", $call, $name; } return (1, @out)