From d7b9494c9717fe1f8309355c428966e951a187b5 Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 3 Mar 2001 14:07:33 +0000 Subject: [PATCH] even betterer --- perl/Messages | 4 ++-- perl/cluster.pl | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/perl/Messages b/perl/Messages index 2a42e71e..8b555dfa 100644 --- a/perl/Messages +++ b/perl/Messages @@ -22,8 +22,8 @@ package DXM; beepoff => 'Beeps are now off', beepon => 'Beeps are now on', call1 => 'Callsign lookup via $_[0]:', - conother => 'Sorry $_[0] you are connected on another port', - concluster => 'Sorry $_[0] you are already connected elsewhere on the cluster', + conother => 'Sorry $_[0] you are connected on another port here', + concluster => 'Sorry $_[0] you are already connected elsewhere on the cluster ($_[1])', conscript => 'no connect script called \"$_[0]\" found in $main::root/connect', confail => 'connection to $_[0] failed ($_[1])', constart => 'connection to $_[0] started', diff --git a/perl/cluster.pl b/perl/cluster.pl index d34a3337..50e860d2 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -129,7 +129,7 @@ sub rec # is there one already connected to me - locally? my $user = DXUser->get($call); if (DXChannel->get($call)) { - my $mess = DXM::msg($lang, ($user && $user->is_node) ? 'concluster' : 'conother', $call); + my $mess = DXM::msg($lang, ($user && $user->is_node) ? 'concluster' : 'conother', $call, $main::mycall); already_conn($conn, $call, $mess); return; } @@ -139,16 +139,16 @@ sub rec if (($user->is_node || $call eq $myalias) && !DXCluster->get_exact($call)) { ; } else { - if (DXCluster->get_exact($call)) { - my $mess = DXM::msg($lang, $user->is_node ? 'concluster' : 'conother', $call); + if (my $ref = DXCluster->get_exact($call)) { + my $mess = DXM::msg($lang, 'concluster', $call, $ref->mynode->call); already_conn($conn, $call, $mess); return; } } $user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems } else { - if (DXCluster->get_exact($call)) { - my $mess = DXM::msg($lang, 'conother', $call); + if (my $ref = DXCluster->get_exact($call)) { + my $mess = DXM::msg($lang, 'concluster', $call, $ref->mynode->call); already_conn($conn, $call, $mess); return; } @@ -159,6 +159,7 @@ sub rec if ($user->lockout) { Log('DXCommand', "$call is locked out, disconnected"); $conn->send_now("Z$call|bye"); # this will cause 'client' to disconnect + $conn->disconect; return; } -- 2.43.0