From: djk Date: Thu, 8 Jun 2000 18:47:48 +0000 (+0000) Subject: added echo and noecho for clients to set/unset X-Git-Tag: R_1_40~11 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c0c1870d27827056e62012828bc7233abde1f01;p=spider.git added echo and noecho for clients to set/unset fixed various client->cluster protocol misconecptions --- diff --git a/Changes b/Changes index 979873b7..786a81db 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +08Jun00======================================================================= +1. fixed problem with binary characters from cluster->client +2. added set/echo and unset/echo commands +3. echo login characters on login: prompt for C client +4. Send \r\n on telnet connections for C Client 11May00======================================================================= 1. fixed looping in Msg.pm (at last) 10May00======================================================================= diff --git a/cmd/Aliases b/cmd/Aliases index 338a8098..8b006a98 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -89,6 +89,7 @@ package CmdAlias; '^set/nohe', 'unset/here', 'unset/here', '^set/noan', 'unset/announce', 'unset/announce', '^set/nodx', 'unset/dx', 'unset/dx', + '^set/noe', 'unset/echo', 'unset/echo', '^set/nota', 'unset/talk', 'unset/talk', '^set/noww', 'unset/wwv', 'unset/wwv', '^set/nowx', 'unset/wx', 'unset/wx', diff --git a/cmd/set/echo.pl b/cmd/set/echo.pl new file mode 100644 index 00000000..3bea9430 --- /dev/null +++ b/cmd/set/echo.pl @@ -0,0 +1,10 @@ +# +# set echoing +# +# Copyright (c) 2000 - Dirk Koopman G1TLH +# +# $Id$ +# +my $self = shift; +$self->send_now("E", "1"); +return (1, $self->msg('echoon')); diff --git a/cmd/unset/echo.pl b/cmd/unset/echo.pl new file mode 100644 index 00000000..a2cccac7 --- /dev/null +++ b/cmd/unset/echo.pl @@ -0,0 +1,10 @@ +# +# set echoing +# +# Copyright (c) 2000 - Dirk Koopman G1TLH +# +# $Id$ +# +my $self = shift; +$self->send_now("E", "0"); +return (1, $self->msg('echooff')); diff --git a/perl/Messages b/perl/Messages index a70dccc9..8fe2c1e8 100644 --- a/perl/Messages +++ b/perl/Messages @@ -56,7 +56,9 @@ package DXM; e14 => 'First argument must be numeric and > 0', e15 => 'invalid qualifier \"$_[0]\"', e16 => 'File \"$_[0]\" exists', - + + echoon => 'Echoing enabled', + echooff => 'Echoing disabled', emaile1 => 'Please enter your email address, set/email ', emaila => 'Your E-Mail Address is now \"$_[0]\"', email => 'E-mail address set to: $_[0]', diff --git a/perl/Msg.pm b/perl/Msg.pm index b626e27c..b3816df3 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -89,7 +89,7 @@ sub _enqueue { my ($conn, $msg) = @_; # prepend length (encoded as network long) my $len = length($msg); - $msg =~ s/(\x00-\x2f\x7e-\xff%])/sprintf("%%%02X", ord($1))/eg; + $msg =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg; push (@{$conn->{queue}}, $msg . "\n"); }