projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove -0 on callsigns
[spider.git]
/
perl
/
client.pl
diff --git
a/perl/client.pl
b/perl/client.pl
index 47e05463a08fc4dc4ed13ce287a7759fbbe08732..b84945783155cd70a36685524ab78bf50fd98735 100755
(executable)
--- a/
perl/client.pl
+++ b/
perl/client.pl
@@
-182,7
+182,7
@@
sub rec_stdin
} elsif ($r > 0) {
if ($mode) {
$buf =~ s/\r/\n/g if $mode == 1;
} elsif ($r > 0) {
if ($mode) {
$buf =~ s/\r/\n/g if $mode == 1;
- $buf =~ s/[\r\x00]//g if $mode == 2;
+ $buf =~ s/[\r\x00]//g if $mode == 2
|| $mode == 3
;
$dangle = !($buf =~ /\n$/);
if ($buf eq "\n") {
$dangle = !($buf =~ /\n$/);
if ($buf eq "\n") {
@@
-229,7
+229,7
@@
sub doconnect
$sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO);
$sock->open($host) or die "Can't connect to $host port $port $!";
$sock->binmode(1);
$sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO);
$sock->open($host) or die "Can't connect to $host port $port $!";
$sock->binmode(1);
- $mode =
($port == 23) ? 2 :
3;
+ $mode = 3;
} elsif ($sort eq 'ax25' || $sort eq 'prog') {
my @args = split /\s+/, $line;
$rfh = new IO::File;
} elsif ($sort eq 'ax25' || $sort eq 'prog') {
my @args = split /\s+/, $line;
$rfh = new IO::File;
@@
-289,7
+289,7
@@
sub dochat
$line =~ s/\r/\n/g;
chomp;
}
$line =~ s/\r/\n/g;
chomp;
}
- dbg('connect',
"received \"$line\""
);
+ dbg('connect',
map { "received \"$_\"" } split /\n/, $line
);
if ($abort && $line =~ /$abort/i) {
dbg('connect', "aborted on /$abort/");
cease(11);
if ($abort && $line =~ /$abort/i) {
dbg('connect', "aborted on /$abort/");
cease(11);
@@
-477,6
+477,7
@@
if ($connsort eq "connect") {
setmode();
# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
setmode();
# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
+$call =~ s/-0$//; # strip off -0 as this is equiv to just call on its own
my ($scall, $ssid) = split /-/, $call;
$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
if ($ssid) {
my ($scall, $ssid) = split /-/, $call;
$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
if ($ssid) {