+sub conf
+{
+ my $self = shift;
+ my $r = shift;
+ return $self ? 1 : 0 unless ref $self;
+ return $self->{flags} & 1 unless $r;
+ $self->{flags} = (($self->{flags} & ~1) | ($r ? 1 : 0));
+ return $r;
+}
+
+#
+# display routines
+#
+
+sub user_call
+{
+ my $self = shift;
+ my $call = sprintf "%s", $self->{call};
+ return $self->here ? "$call" : "($call)";
+}
+
+sub config
+{
+ my $self = shift;
+ my $nodes_only = shift;
+ my $level = shift;
+ my @out;
+ my $line;
+ my $call = $self->user_call;
+ my $printit = 1;
+
+ # allow ranges
+ if (@_) {
+ $printit = grep $call =~ m|$_|, @_;
+ }
+
+ if ($printit) {
+ $line = ' ' x ($level*2) . "$call";
+ $call = ' ' x length $call;
+ unless ($nodes_only) {
+ if (@{$self->{users}}) {
+ $line .= '->';
+ foreach my $ucall (sort @{$self->{users}}) {
+ my $uref = Route::User::get($ucall);
+ my $c;
+ if ($uref) {
+ $c = $uref->user_call;
+ } else {
+ $c = "$ucall?";
+ }
+ if ((length $line) + (length $c) + 1 < 79) {
+ $line .= $c . ' ';
+ } else {
+ $line =~ s/\s+$//;
+ push @out, $line;
+ $line = ' ' x ($level*2) . "$call->";
+ }
+ }
+ }
+ }
+ $line =~ s/->$//g;
+ $line =~ s/\s+$//;
+ push @out, $line if length $line;
+ }
+
+ foreach my $ncall (sort @{$self->{nodes}}) {
+ my $nref = Route::Node::get($ncall);
+
+ if ($nref) {
+ my $c = $nref->user_call;
+ push @out, $nref->config($nodes_only, $level+1, @_);
+ } else {
+ push @out, ' ' x (($level+1)*2) . "$ncall?" if @_ == 0 || (@_ && grep $ncall =~ m|$_|, @_);
+ }
+ }
+
+ return @out;
+}
+
+#
+# routing things
+#
+
+