From ce93c2b985c3ac38b4909025de62c264423fce21 Mon Sep 17 00:00:00 2001 From: djk Date: Sun, 21 Nov 1999 21:18:49 +0000 Subject: [PATCH] tidied up login: changes in client.pl --- perl/client.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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); } -- 2.43.0