[Dxspider-support] WHO command
iw5dez
iw5dez at supereva.it
Wed Jul 2 18:08:57 BST 2003
Hi everybody,
I've improved WHO.PL to indicate that connection is by radio port (AGW i.e.)
or IP. If someone wan to try... Sorry for my ugly perl-style!!!
#
# who : is online
# a complete list of stations connected
#
# Copyright (c) 1999 Dirk Koopman G1TLH
#
# $Id: who.pl,v 1.14 2001/09/20 14:13:11 minima Exp $
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 = '';
#
# START NEW
#
if ($conn->{peerhost} eq '') {
if ($conn->{agwport} eq '') {
$ip=" ";
} else {
$ip=sprintf "RadioPort(%s)",$conn->{agwport};
}
} else {
$ip = sprintf "IP(%s)",$conn->{peerhost};
}
#
# STOP NEW
#
push @out, sprintf "%10s $type $sort $t %-10.10s $ping $ip", $call, $name;
}
return (1, @out)
More information about the Dxspider-support
mailing list