projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a pretty nearly working gtkconsole...
[spider.git]
/
perl
/
Route.pm
diff --git
a/perl/Route.pm
b/perl/Route.pm
index 5f9de7d72a823db72b50d20791362638e6454e02..582434415073033e2ba22aed70c625b2e2c8e3b1 100644
(file)
--- a/
perl/Route.pm
+++ b/
perl/Route.pm
@@
-60,7
+60,9
@@
$filterdef = bless ([
sub new
{
sub new
{
- my ($pkg, $call) = @_;
+ my $pkg = shift;
+ my $call = shift;
+
$pkg = ref $pkg if ref $pkg;
my $self = bless {call => $call}, $pkg;
$pkg = ref $pkg if ref $pkg;
my $self = bless {call => $call}, $pkg;
@@
-70,7
+72,7
@@
sub new
($self->{dxcc}, $self->{itu}, $self->{cq}, $self->{state}, $self->{city}) =
Prefix::cty_data($call);
($self->{dxcc}, $self->{itu}, $self->{cq}, $self->{state}, $self->{city}) =
Prefix::cty_data($call);
- $self->{flags} =
here(1)
;
+ $self->{flags} =
1
;
return $self;
}
return $self;
}
@@
-128,17
+130,20
@@
sub _dellist
return @out;
}
return @out;
}
-sub
is_empty
+sub
_haslist
{
my $self = shift;
{
my $self = shift;
- return @{$self->{$_[0]}} == 0;
+ my $field = shift;
+ my @out;
+ my $call = shift;
+ my $r = grep $_->{call} eq $call, @{$self->{$field}};
+ dbg(ref($self) . " $call is " . $r?'in':'NOT in' . " $self->{call}\->\{$field\}") if isdbg('routelow');
}
}
-sub is_
aranea
+sub is_
empty
{
my $self = shift;
{
my $self = shift;
- $self->{aranea} = shift if @_;
- return $self->{aranea};
+ return @{$self->{$_[0]}} == 0;
}
#
}
#
@@
-156,21
+161,15
@@
sub is_aranea
sub here
{
my $self = shift;
sub here
{
my $self = shift;
- my $r = shift;
- return $self ? 2 : 0 unless ref $self;
- return ($self->{flags} & 2) ? 1 : 0 unless defined $r;
- $self->{flags} = (($self->{flags} & ~1) | ($r ? 1 : 0));
- return $r ? 1 : 0;
+ $self->{flags} = shift if @_;
+ return $self->{flags};
}
}
+# conferencing in the ak1a sense is not supported
sub conf
{
my $self = shift;
sub conf
{
my $self = shift;
- my $r = shift;
- return $self ? 2 : 0 unless ref $self;
- return ($self->{flags} & 1) ? 1 : 0 unless defined $r;
- $self->{flags} = (($self->{flags} & ~2) | ($r ? 2 : 0));
- return $r ? 2 : 0;
+ return 0;
}
sub parents
}
sub parents
@@
-213,7
+212,7
@@
sub config
# recursion detector
if ((DXChannel::get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) {
$line .= ' ...';
# recursion detector
if ((DXChannel::get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) {
$line .= ' ...';
-
push @out, $line;
+
#
push @out, $line;
return @out;
}
push @$seen, $self->{call};
return @out;
}
push @$seen, $self->{call};