}
my $thing = Thingy::Ping->new(origin=>$main::mycall);
- $thing->from_DXProt($_[2] eq $self->{call} ? (user=>$_[2]) : (user=>$self->{call}, o=>$_[2]), group=>$_[1], out=>$_[3], DXProt=>$line);
- $thing->process($self);
-
+ $thing->from_DXProt($self, $line, @_);
+ $thing->handle($self);
}
# dunno but route it
use Time::HiRes qw(gettimeofday tv_interval);
-use vars qw(@ISA %ping);
+use vars qw(@ISA %ping $ping_ttl);
@ISA = qw(Thingy);
my $id;
+$ping_ttl = 300; # default ping ttl
+
sub gen_Aranea
{
return $buf;
}
+# called with the dxchan, line and the split out arguments
sub from_DXProt
{
- my $thing = ref $_[0] ? shift : $_[0]->SUPER::new();
-
- while (@_) {
- my $k = shift;
- $thing->{$k} = shift;
- }
+ my $thing = ref $_[0] ? shift : $_[0]->SUPER::new(origin=>$main::mycall);
+ my $dxchan = shift;
+ $thing->{DXProt} = shift;
+ $thing->{group} = shift; # to call
+ my $from = shift;
+ $thing->{out} = shift; # 1 = ping, 0 = pong;
+ $thing->{user} = $dxchan->{call};
+ $thing->{o} = $from unless $from eq $dxchan->{call};
+ $thing->remember if $thing->{out};
return $thing;
}
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
unshift @INC, "$root/local";
+ sub main::mkver {}
}
use DXVars;
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
+ sub main::mkver {}
}
use DXVars;
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
unshift @INC, "$root/local";
+ sub main::mkver {}
}
use DXVars;
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
+ sub main::mkver {}
}
use IO::File;