X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FThingy%2FHello.pm;h=a23bb43877e1a35b4cac86449d3e07987cf4070f;hb=729acdaa4d7ee8905ce76f6ab0ef6cd543c3bc49;hp=52230aa16c2db0c727b00982685aca091a0a66d3;hpb=a05049f350f2acb4de3f76c7aed205417da688f6;p=spider.git diff --git a/perl/Thingy/Hello.pm b/perl/Thingy/Hello.pm index 52230aa1..a23bb438 100644 --- a/perl/Thingy/Hello.pm +++ b/perl/Thingy/Hello.pm @@ -90,7 +90,7 @@ sub handle $thing->send($dxchan); # broadcast our configuration to the world - $thing = Thingy::Rt->new_lcf; + $thing = Thingy::Rt->new_cf; $thing->broadcast; } } @@ -113,16 +113,18 @@ sub handle if (my $user = $thing->{user}) { my $ur = Route::get($user); unless ($ur) { - my $uref = DXUser->get_current($user) || Thingy::Hello::_upd_user_rec($user, $origin)->put; + 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;