From 299b605c22ab87d3410e8186192bc25af20c2c3a Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Thu, 27 Sep 2007 18:44:11 +0100 Subject: [PATCH] recast the callsign gathering --- gtkconsole/gtkconsole | 35 ++++++++++++++++------------------- perl/Version.pm | 2 +- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/gtkconsole/gtkconsole b/gtkconsole/gtkconsole index db12d1e0..f2d39d9f 100755 --- a/gtkconsole/gtkconsole +++ b/gtkconsole/gtkconsole @@ -85,37 +85,34 @@ if (@ARGV) { $port = shift @ARGV if @ARGV; } -unless ($call && $host) { +unless ($call) { + $call = $main::myalias; +} + +unless ($host) { my $node = $user->{clusters}->{$user->{node}}; if ($node->{call} || $user->{call}) { - $call = $node->{call} || $user->{call} || $main::myalias; - $host = $node->{passwd}; $host = $node->{host}; - $port = $node->{port}; + $port ||= $node->{port}; } -} -unless ($call && $host) { - if (-e "$root/local/Listeners.pm") { - require "$root/local/Listeners.pm"; - $host = $main::listen->[0]->[0]; - $port = $main::listen->[0]->[1]; - $host ||= '127.0.0.1'; - $host = "127.0.0.1" if $host eq '0.0.0.0'; - $port ||= 7300; + unless ($host) { + if (-e "$root/local/Listeners.pm") { + require "$root/local/Listeners.pm"; + $host = $main::listen->[0]->[0]; + $port = $main::listen->[0]->[1]; + $host ||= '127.0.0.1'; + $host = "127.0.0.1" if !$host && ($host eq '0.0.0.0' || $host eq '::'); + $port ||= 7300; + } } } -unless ($host) { - $host = $user->{clusters}->{$user->{node}}->{host}; - $port = $user->{clusters}->{$user->{node}}->{port}; -} - $call ||= ''; $host ||= ''; $port ||= ''; -die "You need a callsign ($call), a hostname($host) and a port($port) to proceed" unless $call && $host; +die "You need a callsign ($call), a hostname($host) and a port($port) to proceed" unless $call && $host && $port; # # start of GTK stuff diff --git a/perl/Version.pm b/perl/Version.pm index 822d14ad..5586e4f8 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '160'; +$build = '161'; 1; -- 2.34.1