spider/cmd/who.pl
minima 50f6466ca2 1. fix set/lockout so that it is possible to lock out all SSIDs except those
specifically unlocked and so that you don't need to lock the non-SSID call in
order to lock an SSID call. So set/lock g1tlh will lock out all instances of
g1tlh, g1tlh-1, g1tlh-15 etc except (for instance) unset/lock g1tlh-9.
2. show/lock allows partial callsign matching so sh/lock gb7 will only show
GB7* calls that are locked.
3. Had a grand shift around for the start of NP.
2001-09-20 14:13:11 +00:00

37 lines
996 B
Perl

#
# who : is online
# a complete list of stations connected
#
# Copyright (c) 1999 Dirk Koopman G1TLH
#
# $Id$
my $self = shift;
my $dxchan;
my @out;
push @out, " Callsign Type Started Name Ave RTT Link";
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
my $call = $dxchan->call();
my $t = cldatetime($dxchan->startt);
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 != $main::me ? sprintf("%5.2f", $dxchan->pingave) : " ";
my $conn = $dxchan->conn;
my $ip = '';
$ip = $conn->{peerhost} if $conn && $conn->{peerhost};
push @out, sprintf "%10s $type $sort $t %-10.10s $ping $ip", $call, $name;
}
return (1, @out)