From: djk <djk>
Date: Sun, 21 Nov 1999 20:49:38 +0000 (+0000)
Subject: removed password from login on client
X-Git-Tag: R_1_35~1
X-Git-Url: http://dxspider.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=295f32fa75fefedcf1cd980c5afcc5de08417ba9;p=spider.git

removed password from login on client
added set/home as an alias for set/homenode not set/homebbs
---

diff --git a/cmd/Aliases b/cmd/Aliases
index 17f0c947..6d384b7c 100644
--- a/cmd/Aliases
+++ b/cmd/Aliases
@@ -84,6 +84,7 @@ package CmdAlias;
 	's' => [
 	  '^s/p$', 'send', 'send',
 	  '^sb$', 'send noprivate', 'send',
+	  '^set/home$', 'set/homenode', 'set/homenode',
 	  '^set/nobe', 'unset/beep', 'unset/beep',
 	  '^set/nohe', 'unset/here', 'unset/here',
 	  '^set/noan', 'unset/announce', 'unset/announce',
@@ -92,8 +93,6 @@ package CmdAlias;
 	  '^set/noww', 'unset/wwv', 'unset/wwv',
 	  '^set/nowx', 'unset/wx', 'unset/wx',
 	  '^sh$', 'show', 'show',
-      '^sh\w*/up', 'show/cluster', 'show/cluster',
-	  '^sh\w*/tnc', 'who', 'who',
 	  '^sh\w*/bu', 'show/files bulletins', 'show/files',
 	  '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration',
 	  '^sh\w*/c$', 'show/configuration', 'show/configuration',
@@ -101,6 +100,8 @@ package CmdAlias;
 	  '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
 	  '^sh\w*/dx/(\d+)', 'show/dx $1', 'show/dx',
 	  '^sh\w*/dx/d(\d+)', 'show/dx from $1', 'show/dx',
+	  '^sh\w*/tnc', 'who', 'who',
+      '^sh\w*/up', 'show/cluster', 'show/cluster',
 	  '^sh\w*/w\w*/(\d+)-(\d+)', 'show/wwv $1-$2', 'show/wwv',
 	  '^sh\w*/w\w*/(\d+)', 'show/wwv $1', 'show/wwv',
 	  '^sp$', 'send', 'send',
diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm
index ac2b63e4..caaa3800 100644
--- a/perl/DXUtil.pm
+++ b/perl/DXUtil.pm
@@ -191,9 +191,9 @@ sub shellregex
 # start an attempt at determining whether this string might be a callsign
 sub iscallsign
 {
-	my $call = shift;
-	return 1 if $call =~ /^\w+\d+/;
-	return 1 if $call =~ /^\d+\w+/;
+	my $call = uc shift;
+	return 1 if $call =~ /^[A-Z]+\d+[A-Z]+/;
+	return 1 if $call =~ /^\d+[A-Z]\d+[A-Z]+/;
 	return undef;
 }
 
diff --git a/perl/client.pl b/perl/client.pl
index 9f39fdd1..db3bb80a 100755
--- a/perl/client.pl
+++ b/perl/client.pl
@@ -41,6 +41,7 @@ BEGIN {
 use Msg;
 use DXVars;
 use DXDebug;
+use DXUtil;
 use Net::Telnet qw(TELOPT_ECHO);
 use IO::File;
 use IO::Socket;
@@ -378,42 +379,22 @@ if ($loginreq) {
 		$stdout->print($issue) if $issue;
 	}
 	
-
-	use DXUser;
-	
-	DXUser->init($userfn);
-	
 	# allow a login from an existing user. I could create a user but
 	# I want to check for valid callsigns and I don't have the 
 	# necessary info / regular expression yet
-	for ($state = 0; $state < 2; ) {
-		alarm($timeout);
+	alarm($timeout);
 		
-		if ($state == 0) {
-			$stdout->print('login: ');
-			$stdout->flush();
-			local $\ = $nl;
-			$s = $stdin->getline();
-			chomp $s;
-			$s =~ s/\s+//og;
-			$s =~ s/-\d+$//o;            # no ssids!
-			cease(0) unless $s gt ' ';
-			$call = uc $s;
-			$user = DXUser->get($call);
-			$state = 1;
-		} elsif ($state == 1) {
-			$stdout->print('password: ');
-			$stdout->flush();
-			local $\ = $nl;
-			$s = $stdin->getline();
-			chomp $s;
-			$state = 2;
-			if (!$user || ($user->passwd && $user->passwd ne $s)) {
-				$stdout->print("sorry...$nl");
-				cease(0);
-			}
-		}
-	}
+	$stdout->print('login: ');
+	$stdout->flush();
+	local $\ = $nl;
+	$s = $stdin->getline();
+	chomp $s;
+	$s =~ s/\s+//og;
+	$s =~ s/-\d+$//o;            # no ssids!
+	cease(0) unless $s gt ' ' && iscallsign($s);
+	$call = uc $s;
+	$connsort = 'telnet' if $connsort eq 'local';
+	alarm(0);
 }
 
 # handle callsign and connection type firtling