[Dxspider-support] WHO command
Erminio Pandocchi
i2eow at fastwebnet.it
Wed Jul 2 18:30:06 BST 2003
Fine
But I don't like the ip address is showed up
It was in this way in the original version too
Erminio
----- Original Message -----
From: "iw5dez" <iw5dez at supereva.it>
To: "The DXSpider Support list" <dxspider-support at dxcluster.org>
Sent: Wednesday, July 02, 2003 7:08 PM
Subject: [Dxspider-support] WHO command
> 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)
>
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at dxcluster.org
> http://www.tobit.co.uk/mailman/listinfo/dxspider-support
More information about the Dxspider-support
mailing list