X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FThingy%2FHello.pm;h=cd31842fd51b3555227ababf540c4c5280d7aa8e;hb=320d95463f2d936e627e485702949c9cee704d0b;hp=4ff8ebda6f9b63fb254362ea7ce5b8fd01d9500b;hpb=eb2a2eb1aa8e7c743c23ec5e0dc5aa40a8708e79;p=spider.git diff --git a/perl/Thingy/Hello.pm b/perl/Thingy/Hello.pm index 4ff8ebda..cd31842f 100644 --- a/perl/Thingy/Hello.pm +++ b/perl/Thingy/Hello.pm @@ -113,14 +113,17 @@ sub handle 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::Hello::_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; } 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 = Route::get($user); } $ur->np(1); } else {