+ # delete parent from this call's parent list
+ $pref->_delnode($self);
+ $self->_delparent($pref);
+ my @nodes;
+ my $ncall = $self->{call};
+
+ # is this the last connection, I have no parents anymore?
+ unless (@{$self->{parent}}) {
+ foreach my $rcall (@{$self->{nodes}}) {
+ next if grep $rcall eq $_, @_;
+ my $r = Route::Node::get($rcall);
+ push @nodes, $r->del($self, $ncall, @_) if $r;
+ }
+ $self->_del_users;
+ delete $list{$self->{call}};
+ push @nodes, $self;
+ }
+ return @nodes;
+}
+
+sub del_nodes
+{
+ my $parent = shift;
+ my @out;
+ foreach my $rcall (@{$parent->{nodes}}) {
+ my $r = get($rcall);
+ push @out, $r->del($parent, $parent->{call}, @_) if $r;
+ }
+ return @out;
+}
+
+sub _del_users
+{
+ my $self = shift;
+ for (@{$self->{users}}) {
+ my $ref = Route::User::get($_);
+ $ref->del($self) if $ref;
+ }
+ $self->{users} = [];
+}
+
+# add a user to this node
+sub add_user
+{
+ my $self = shift;
+ my $ucall = shift;
+
+ confess "Trying to add NULL User call to routing tables" unless $ucall;
+
+ my $uref = Route::User::get($ucall);
+ my @out;
+ if ($uref) {
+ @out = $uref->addparent($self);
+ } else {
+ $uref = Route::User->new($ucall, $self->{call}, @_);
+ @out = $uref;
+ }
+ $self->_adduser($uref);
+ $self->{usercount} = scalar @{$self->{users}};
+
+ return @out;
+}
+
+# delete a user from this node
+sub del_user
+{
+ my $self = shift;
+ my $ref = shift;
+ my @out;
+
+ if ($ref) {
+ @out = $self->_deluser($ref);
+ $ref->del($self);
+ } else {
+ confess "tried to delete non-existant $ref->{call} from $self->{call}";
+ }
+ $self->{usercount} = scalar @{$self->{users}};
+ return @out;
+}
+
+sub usercount