]> dxcluster.org Git - spider.git/commitdiff
removed password from login on client
authordjk <djk>
Sun, 21 Nov 1999 20:49:38 +0000 (20:49 +0000)
committerdjk <djk>
Sun, 21 Nov 1999 20:49:38 +0000 (20:49 +0000)
added set/home as an alias for set/homenode not set/homebbs

cmd/Aliases
perl/DXUtil.pm
perl/client.pl

index 17f0c9474f3ed1608bda67c9c9e19f7744fe309f..6d384b7c208bd9a106636a5ce8d9257822bfd34c 100644 (file)
@@ -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',
index ac2b63e42a282212f79a8627e04468dca957f115..caaa38008b18928ad4435612ed84357ce67b965b 100644 (file)
@@ -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;
 }
 
index 9f39fdd135c42e22cc1a2249528e06edfaf6fdb4..db3bb80a1b720be88880cd3b5323c0d2e1e5410d 100755 (executable)
@@ -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