From a153b8df39668d98f01238e1c49d9e9a51ec5484 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sun, 5 Jul 2020 18:23:32 +0100 Subject: [PATCH] attempt to prevent echoing on ExtMsg login This is to try to prevent any PROXY message being echoed --- perl/ExtMsg.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index c5d6d854..6b3a30b1 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -64,6 +64,24 @@ sub echo $conn->{echo} = shift; } +sub _rcv +{ + my $conn = shift; # $rcv_now complement of $flush + my $msg = shift; + my $sock = $conn->{sock}; + return unless defined($sock); + return if $conn->{disconnecting}; + + if ($conn->{state} eq 'WL' && $conn->{sort} =~ /^I/ && $msg =~ /^PROXY/) { + my $echo = $conn->{echo}; + $conn->{echo} = 0; + $conn->SUPER::_rcv($msg); + $conn->{echo} = $echo; + } else { + $conn->SUPER::_rcv($msg); + } +} + sub dequeue { my $conn = shift; @@ -182,7 +200,7 @@ sub new_client { $conn->_send_file(localdata("issue")); $conn->send_raw("login: "); $conn->_dotimeout(60); - $conn->{echo} = 1; +# $conn->{echo} = 1; } sub start_connect -- 2.43.0