deletion two days hence. To have the old behaviour, do a 'kill exp' or use
the standard alias "expunge". This will cause the message to be deleted at
the next queue message cycle.
+5. Put in prototype echo handling for direct connections using ExtMsg and
+Listeners.pm.
04Oct01=======================================================================
1. allow a residence time of (default) 2 days before actually deleting a msg.
2. reduce the number R: lines on a bull from a bbs to 2 (the origin and the
}
# decide on echo
- if (!$user->wantecho) {
+ my $echo = $user->wantecho;
+ unless ($echo) {
$self->send_now('E', "0");
$self->send($self->msg('echow'));
+ $self->conn->echo($echo) if $self->conn->can('echo');
}
$self->tell_login('loginu');
my @out = import_one($main::me, \@msg, $splitit);
Log('msg', @out);
}
- queue_msg(0);
}
# import one message as a list in bbs (as extended) mode
# set unbuffered and no echo
$self->send_now('B',"0");
$self->send_now('E',"0");
+ $self->conn->echo(0) if $self->conn->can('echo');
# ping neighbour node stuff
my $ping = $user->pingint;
Msg::set_event_handler ($sock, "write" => sub {$conn->_send(0)});
}
+sub echo
+{
+ my $conn = shift;
+ $conn->{echo} = shift;
+}
+
sub dequeue
{
my $conn = shift;
$conn->_send_file("$main::data/issue");
$conn->send_raw("login: ");
$conn->_dotimeout(60);
+ $conn->{echo} = 1;
} else {
&{$conn->{eproc}}() if $conn->{eproc};
$conn->disconnect();
$bytes_read = sysread ($sock, $msg, 1024, 0);
if (defined ($bytes_read)) {
if ($bytes_read > 0) {
- $conn->{msg} .= $msg;
if (isdbg('raw')) {
my $call = $conn->{call} || 'none';
dbgdump('raw', "$call read $bytes_read: ", $msg);
}
+ if ($conn->{echo}) {
+ my @ch = split //, $msg;
+ my $out;
+ for (@ch) {
+ if (/[\cH\x7f]/) {
+ $out .= "\cH \cH";
+ $conn->{msg} =~ s/.$//;
+ } else {
+ $out .= $_;
+ $conn->{msg} .= $_;
+ }
+ }
+ if (defined $out) {
+ set_event_handler ($sock, write => sub{$conn->_send(0)});
+ push @{$conn->{outqueue}}, $out;
+ }
+ } else {
+ $conn->{msg} .= $msg;
+ }
}
} else {
if (_err_will_block($!)) {