'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',
'^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',
'^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',
use Msg;
use DXVars;
use DXDebug;
+use DXUtil;
use Net::Telnet qw(TELOPT_ECHO);
use IO::File;
use IO::Socket;
$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