]> dxcluster.net Git - spider.git/commitdiff
fix echoing (?)
authorDirk Koopman <djk@tobit.co.uk>
Thu, 22 Dec 2011 23:02:35 +0000 (23:02 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 22 Dec 2011 23:02:35 +0000 (23:02 +0000)
cmd/set/echo.pl
cmd/unset/echo.pl
perl/Msg.pm

index 4bf41ae77d55afb9d7891caad9f2e90420d60ca2..ccbc843a0906b49dc3a00b177dd9a665c0869ff5 100644 (file)
@@ -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'));
index 592870707b540b5d35596f4c2cbe4f8df81349a7..dba0b8e0f3f195ce951c5605e59ed1753e8f0fb5 100644 (file)
@@ -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'));
index dcc3c812d1ac77763c3e41bd47439a17a4589885..52f0efd477aefbee6d622f0c708d92875b31eeca 100644 (file)
@@ -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;