$thing->send($dxchan);
# broadcast our configuration to the world
- $thing = Thingy::Rt->new_lcf;
+ $thing = Thingy::Rt->new_cf;
$thing->broadcast;
}
}
if (my $user = $thing->{user}) {
my $ur = Route::get($user);
unless ($ur) {
- my $uref = DXUser->get_current($user);
+ my @ref;
+ my $uref = DXUser->get_current($user) || Thingy::Rt::_upd_user_rec($user, $origin)->put;
if ($uref->is_node || $uref->is_aranea) {
- $ur = $nref->add($user, $thing->{v}, $thing->{h});
- push @{$thing->{pc19n}}, $ur if $ur;
+ push @ref, $nref->add($user, $thing->{v}, $thing->{h});
+ push @{$thing->{pc19n}}, @ref if @ref;
+ do $_->np(1) for @ref;
} else {
$thing->{pc16n} = $nref;
- $thing->{pc16u} = [$ur = $nref->add_user($user, $thing->{h})];
+ push @ref, $nref->add_user($user, $thing->{h});
+ $thing->{pc16u} = \@ref if @ref;
}
}
- $ur->np(1);
} else {
$nref->version($thing->{v}) unless $nref->version;
$nref->build($thing->{b}) unless $nref->build;