remove -0 on callsigns
[spider.git] / perl / client.pl
index 611c313daa61de0be049f8122a0b0dd977907717..b84945783155cd70a36685524ab78bf50fd98735 100755 (executable)
@@ -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);
-               $mode = ($port == 23) ? 2 : 3;
+               $mode = 3;
        } 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;
                        }
-                       dbg('connect', "received \"$line\"");
+                       dbg('connect', map { "received \"$_\"" } split /\n/, $line);
                        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
+$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) {