recast the callsign gathering
authorDirk Koopman <djk@tobit.co.uk>
Thu, 27 Sep 2007 17:44:11 +0000 (18:44 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 27 Sep 2007 17:44:11 +0000 (18:44 +0100)
gtkconsole/gtkconsole
perl/Version.pm

index db12d1e003984c83fb91e81dbab050ac9ff0b9e5..f2d39d9f3bd90d2d717b45ff74538679a62814cc 100755 (executable)
@@ -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
index 822d14ad1899f41f17a5ac9011bab1ffabb8c099..5586e4f8a06c72972d37ad37a5d2f54f7f848155 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.54';
 $subversion = '0';
-$build = '160';
+$build = '161';
 
 1;