alter dup channel connected logic
authorminima <minima>
Tue, 13 Mar 2001 20:36:23 +0000 (20:36 +0000)
committerminima <minima>
Tue, 13 Mar 2001 20:36:23 +0000 (20:36 +0000)
add peerhost to who

Changes
cmd/who.pl
perl/cluster.pl

diff --git a/Changes b/Changes
index 549e49d806d27ef19d956c996ddabfd0b3152644..6ee6f6d7a929179ff280a974099ec697c5c60b2e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 13Mar01=======================================================================
 1. implemented first cut at non blocking connect
 2. removed memory leakage in connects
+3. add link IP address if available on who
 10Mar01=======================================================================
 1. minor changes to the admin manual to reflect differences in distibutions
 thanks to pa3ezl (g0vgs)
index 8bd69e80a5e5599f1da118f595ce5f71e9f00c15..1ccf9ca8a39bb5b00a055e1d107451c97ba93ad0 100644 (file)
@@ -11,7 +11,7 @@ my $self = shift;
 my $dxchan;
 my @out;
 
-push @out, "  Callsign Type      Started           Name                Ave RTT";
+push @out, "  Callsign Type      Started           Name     Ave RTT Link";
 
 foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
     my $call = $dxchan->call();
@@ -26,8 +26,10 @@ foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
                $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 $type $sort $t %-18.18s $ping", $call, $name;
+       my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%5.2f", $dxchan->pingave) : "     ";
+       my $conn = $dxchan->conn;
+       my $ip = $conn->{peerhost} || '' if $conn;
+       push @out, sprintf "%10s $type $sort $t %-10.10s $ping $ip", $call, $name;
 }
 
 return (1, @out)
index e062b65ed7c7184808042c4d51c23018af931901..181e3054c77d83611a97ba20d9aea4736ae5ef47 100755 (executable)
@@ -115,7 +115,8 @@ sub new_channel
        # set up the basic channel info
        # is there one already connected to me - locally? 
        my $user = DXUser->get($call);
-       if ($sort ne 'O' && Msg->conns($call)) {
+       my $dxchan = DXChannel->get($call);
+       if ($dxchan) {
                my $mess = DXM::msg($lang, ($user && $user->is_node) ? 'concluster' : 'conother', $call, $main::mycall);
                already_conn($conn, $call, $mess);
                return;
@@ -150,7 +151,6 @@ sub new_channel
        }
 
        # create the channel
-       my $dxchan;
        $dxchan = DXCommandmode->new($call, $conn, $user) if $user->is_user;
        $dxchan = DXProt->new($call, $conn, $user) if $user->is_node;
        $dxchan = BBS->new($call, $conn, $user) if $user->is_bbs;