{
my ($conn, $msg) = @_;
unless ($msg =~ /^[ABZ]/) {
- if ($msg =~ /^E[-\w]+\|([01])/) {
+ if ($msg =~ /^E[-\w]+\|([01])/ && $conn->{csort} eq 'telnet') {
$conn->{echo} = $1;
if ($1) {
- $conn->send_raw("\xFF\xFC\x01");
+# $conn->send_raw("\xFF\xFC\x01");
} else {
- $conn->send_raw("\xFF\xFB\x01");
+# $conn->send_raw("\xFF\xFB\x01");
}
} else {
$msg =~ s/^[-\w]+\|//;
} elsif ($conn->{state} eq 'WL' ) {
$msg = uc $msg;
if (is_callsign($msg)) {
+ &{$conn->{rproc}}($conn, "A$msg|telnet");
_send_file($conn, "$main::data/connected");
- $conn->{call} = $msg;
- &{$conn->{rproc}}($conn, "A$conn->{call}|telnet");
$conn->{state} = 'C';
} else {
$conn->send_now("Sorry $msg is an invalid callsign");
$conn->{state} = 'WL';
# $conn->send_raw("\xff\xfe\x01\xff\xfc\x01\ff\fd\x22");
# $conn->send_raw("\xff\xfa\x22\x01\x01\xff\xf0");
- $conn->send_raw("\xFF\xFC\x01");
+# $conn->send_raw("\xFF\xFC\x01");
_send_file($conn, "$main::data/issue");
- $conn->send_raw("Login: ");
+ $conn->send_raw("login: ");
} else {
$conn->disconnect();
}
my $call = shift;
my $fn = shift;
my $conn = ExtMsg->new(\&main::rec);
- $conn->{call} = $call;
+ $conn->conns($call);
my $f = new IO::File $fn;
push @{$conn->{cmd}}, <$f>;
$f->close;
- push @main::outstanding_connects, {call => $call, conn => $conn};
$conn->_dotimeout($deftimeout);
$conn->_docmd;
}
}
last if $conn->{state} eq 'E';
}
- unless (exists $conn->{cmd} && @{$conn->{cmd}}) {
- @main::outstanding_connects = grep {$_->{call} ne $conn->{call}} @main::outstanding_connects;
- }
}
sub _doconnect
my $conn = shift;
dbg('connect', "timed out after $conn->{timeval} seconds");
$conn->disconnect;
- @main::outstanding_connects = grep {$_->{call} ne $conn->{call}} @main::outstanding_connects;
}
# handle callsign and connection type firtling