+ my $self = shift;
+ my $call = $self->{call};
+ my $ref;
+
+ # delete all the listed calls
+ foreach $ref (values %{$self->{list}}) {
+ $ref->del(); # this also takes them out of this list
+ }
+ delete $DXCluster::cluster{$call}; # remove me from the cluster table
+ dbg('cluster', "deleting node $call from cluster\n");
+ $users -= $self->{users}; # it may be PC50 updated only therefore > 0
+ $users = 0 if $users < 0;
+ $nodes--;
+ $nodes = 0 if $nodes < 0;
+}
+
+sub add_user
+{
+ my $self = shift;
+ my $call = shift;
+ my $ref = shift;
+
+ $self->{list}->{$call} = $ref; # add this user to the list on this node
+ $self->{users} = keys %{$self->{list}};
+ $users++;
+ $maxusers = $users+$nodes if $users+$nodes > $maxusers;
+}
+
+sub del_user
+{
+ my $self = shift;
+ my $call = shift;
+
+ delete $self->{list}->{$call};
+ delete $DXCluster::cluster{$call}; # remove me from the cluster table
+ $self->{users} = keys %{$self->{list}};
+ $users--;
+ $users = 0, warn "\$users gone neg, reset" if $users < 0;
+ $maxusers = $users+$nodes if $users+$nodes > $maxusers;
+}
+
+sub update_users
+{
+ my $self = shift;
+ my $count = shift;
+ $count = 0 unless $count;
+
+ $users -= $self->{users};
+ $self->{users} = $count unless keys %{$self->{list}};
+ $users += $self->{users};
+ $maxusers = $users+$nodes if $users+$nodes > $maxusers;