+
+ # in @rout there should be a list of orphaned (in dxchan terms)
+ # nodes. Now go thru and make sure that all their links are
+ # broken (they should be, but this is to check).
+
+ foreach my $r (@rout) {
+ my @nodes = map { Route::Node::get($_)} $r->nodes;
+ for (@nodes) {
+ next unless $_;
+ dbg("Orphaned node $_->{call}: breaking link to $_->{call}") if isdbg('routelow');
+ $r->unlink_node($_);
+ }
+ }
+ return @rout;
+}
+
+# add a user to this node
+# returns Route::User if it is a new user;
+sub add_user
+{
+ my ($self, $uref) = @_;
+ my $r = $uref->is_empty('nodes');
+ $self->_addlist('users', $uref);
+ $uref->_addlist('nodes', $self);
+ $self->{usercount} = scalar @{$self->{users}};
+ return $r ? ($uref) : ();