projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
latest spot dupe incarnation
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 4b34975c2b00920d7811c8b9c6ac6c4b6a357fb9..1d28e4024ced3cc3a71554ccd7f33aa08477b90d 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-225,6
+225,7
@@
sub init
$main::me->{registered} = 1;
$main::me->{version} = 5252 + $main::version;
$main::me->{build} = $main::build;
$main::me->{registered} = 1;
$main::me->{version} = 5252 + $main::version;
$main::me->{build} = $main::build;
+ $main::me->{lastcf} = $main::me->{lasthello} = time;
}
#
}
#
@@
-238,12
+239,7
@@
sub new
# add this node to the table, the values get filled in later
my $pkg = shift;
my $call = shift;
# add this node to the table, the values get filled in later
my $pkg = shift;
my $call = shift;
- $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall;
- if ($self->{call} ne $main::mycall) {
- my $thing = Thingy::Hello->new(user=>$call);
- $thing->broadcast($self);
- }
-
+ $main::routeroot->add($call, '5000', 1) if $call ne $main::mycall;
return $self;
}
return $self;
}
@@
-313,8
+309,10
@@
sub start
$self->state('init');
$self->{pc50_t} = $main::systime;
$self->state('init');
$self->{pc50_t} = $main::systime;
- my $thing = Thingy::Hello->new(origin=>$main::mycall, user=>$call);
+ # ALWAYS output the hello
+ my $thing = Thingy::Hello->new(user => $call, h => $self->{here});
$thing->broadcast($self);
$thing->broadcast($self);
+ $self->lasthello($main::systime);
# send info to all logged in thingies
$self->tell_login('loginn');
# send info to all logged in thingies
$self->tell_login('loginn');
@@
-813,7
+811,7
@@
sub handle_16
}
$r = Route::User::get($call);
}
$r = Route::User::get($call);
- my $flags =
Route::here($here)|Route::conf($conf)
;
+ my $flags =
$here
;
if ($r) {
my $au = $r->addparent($parent);
if ($r) {
my $au = $r->addparent($parent);
@@
-923,8
+921,8
@@
sub handle_18
# record the type and version offered
if ($_[1] =~ /DXSpider Version: (\d+\.\d+) Build: (\d+\.\d+)/) {
# record the type and version offered
if ($_[1] =~ /DXSpider Version: (\d+\.\d+) Build: (\d+\.\d+)/) {
- $self->version(
52.51
+ $1);
- $self->user->version(
52.51
+ $1);
+ $self->version(
0
+ $1);
+ $self->user->version(
0
+ $1);
$self->build(0 + $2);
$self->user->build(0 + $2);
unless ($self->is_spider) {
$self->build(0 + $2);
$self->user->build(0 + $2);
unless ($self->is_spider) {
@@
-972,7
+970,7
@@
sub handle_19
if ($origin ne $self->call) {
my $op = Route::Node::get($origin);
unless ($op) {
if ($origin ne $self->call) {
my $op = Route::Node::get($origin);
unless ($op) {
- $op = $parent->add($origin, 5000,
Route::here(1)
);
+ $op = $parent->add($origin, 5000,
1
);
my $user = DXUser->get_current($origin);
if (!$user) {
$user = DXUser->new($origin);
my $user = DXUser->get_current($origin);
if (!$user) {
$user = DXUser->new($origin);
@@
-1046,10
+1044,10
@@
sub handle_19
}
my $r = Route::Node::get($call);
}
my $r = Route::Node::get($call);
- my $flags =
Route::here($here)|Route::conf($conf)
;
+ my $flags =
$here
;
# is he under the control of the new protocol?
# is he under the control of the new protocol?
- if ($r->np) {
+ if ($r
&& $r
->np) {
dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
next;
}
dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
next;
}
@@
-1064,11
+1062,6
@@
sub handle_19
next;
}
}
next;
}
}
- if ($r->version ne $ver || $r->flags != $flags) {
- $r->version($ver);
- $r->flags($flags);
- push @rout, $r unless $ar;
- }
} else {
# if he is directly connected or allowed then add him, otherwise store him up for later
} else {
# if he is directly connected or allowed then add him, otherwise store him up for later
@@
-1113,7
+1106,9
@@
sub handle_20
$self->{lastping} = 0;
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$self->{lastping} = 0;
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
- $thing->broadcast if $thing->copy_pc16_data($nref);
+ $thing->copy_pc16_data($nref);
+ $thing->broadcast;
+
$self->lastcf($main::systime);
}
$self->lastcf($main::systime);
}
@@
-1203,7
+1198,8
@@
sub handle_22
$self->{lastping} = 0;
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$self->{lastping} = 0;
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
- $thing->broadcast if $thing->copy_pc16_data($nref);
+ $thing->copy_pc16_data($nref);
+ $thing->broadcast;
$self->lastcf($main::systime);
}
$self->lastcf($main::systime);
}