From: Dirk Koopman Date: Thu, 22 Dec 2011 23:02:35 +0000 (+0000) Subject: fix echoing (?) X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb0a21bec37d41fe3ac70e173b70cc685155b8b6;p=spider.git fix echoing (?) --- diff --git a/cmd/set/echo.pl b/cmd/set/echo.pl index 4bf41ae7..ccbc843a 100644 --- a/cmd/set/echo.pl +++ b/cmd/set/echo.pl @@ -6,6 +6,6 @@ # # my $self = shift; -$self->send_now("E", "1"); +$self->conn->echo(1); $self->user->wantecho(1); return (1, $self->msg('echoon')); diff --git a/cmd/unset/echo.pl b/cmd/unset/echo.pl index 59287070..dba0b8e0 100644 --- a/cmd/unset/echo.pl +++ b/cmd/unset/echo.pl @@ -7,5 +7,6 @@ # my $self = shift; $self->send_now("E", "0"); +$self->conn->echo(0); $self->user->wantecho(0); return (1, $self->msg('echooff')); diff --git a/perl/Msg.pm b/perl/Msg.pm index dcc3c812..52f0efd4 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -466,6 +466,12 @@ sub set_event_handler dbg("Msg::set_event_handler called from ${pkg}::${fn} line $line doing $s"); } +sub echo +{ + my $conn = shift; + return defined $_[0] ? $conn->{echo} = $_[0] : $_[0]; +} + sub DESTROY { my $conn = shift;