From: djk Date: Sun, 21 Nov 1999 21:18:49 +0000 (+0000) Subject: tidied up login: changes in client.pl X-Git-Tag: R_1_35^0 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce93c2b985c3ac38b4909025de62c264423fce21;p=spider.git tidied up login: changes in client.pl --- diff --git a/perl/client.pl b/perl/client.pl index db3bb80a..84ab5d53 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -369,6 +369,9 @@ if ($loginreq) { my $user; my $s; + $connsort = 'telnet' if $connsort eq 'local'; + setmode(); + if (-e "$data/issue") { open(I, "$data/issue") or die; local $/ = undef; @@ -386,14 +389,17 @@ if ($loginreq) { $stdout->print('login: '); $stdout->flush(); - local $\ = $nl; + local $\ = $mynl; $s = $stdin->getline(); chomp $s; $s =~ s/\s+//og; $s =~ s/-\d+$//o; # no ssids! - cease(0) unless $s gt ' ' && iscallsign($s); + cease(0) unless $s && $s gt ' '; + unless (iscallsign($s)) { + $stdout->print("Sorry, $s is an invalid callsign"); + cease(0); + } $call = uc $s; - $connsort = 'telnet' if $connsort eq 'local'; alarm(0); }