- # global route filtering on OUTPUT
- if ($dxchan->{routefilter}) {
- my $ref = Route::Node::get($thing->{origin});
- my ($filter, $hops) = $dxchan->{routefilter}->it($ref);
- unless ($filter) {
- dbg("PCPROT: Rejected by output route filter") if isdbg('chanerr');
- return;
+ my @out = $node->add_user($user, $flag);
+ my $ur = _upd_user_rec($user, $node);
+ $ur->put;
+ return @out;
+}
+
+sub _upd_user_rec
+{
+ my $call = shift;
+ my $parentcall = shift;
+
+ # add this station to the user database, if required
+ my $user = DXUser->get_current($call);
+ $user = DXUser->new($call) if !$user;
+ $user->homenode($parentcall) if !$user->homenode;
+ $user->node($parentcall);
+ $user->lastin($main::systime) unless DXChannel::get($call);
+ return $user;
+}
+
+#
+# Generate a configuration for onward broadcast
+#
+# Basically, this creates a thingy with list of nodes and users that
+# are on this node. This the normal method of spreading this
+# info whenever a node connects and also periodically.
+#
+
+sub new_lcf
+{
+ my $pkg = shift;
+ my $thing = $pkg->SUPER::new(@_);
+
+ $thing->{'s'} = 'cf';
+
+ my @anodes;
+ my @pnodes;
+ my @users;
+
+ foreach my $dxchan (DXChannel::get_all()) {
+ next if $dxchan == $main::me;
+ if ($dxchan->is_node) {
+ my $ref = Route::Node::get($dxchan->{call});
+ push @pnodes, $ref if $ref;
+ } elsif ($dxchan->is_aranea) {
+ my $ref = Route::Node::get($dxchan->{call});
+ push @anodes, $ref if $ref;
+ } else {
+ my $ref = Route::User::get($dxchan->{call});
+ push @users, $ref if $ref;