shouldn't take steps to prevent echoing on node links, but it may help where
(whatever you do) it still bloody echos! This is experimental.
2. store dxchan and mynode as callsigns (and not references) in the routing
-tables and do some checking in accessors to see if we can capture some errors.
+tables and do some checking in accessors to see if we can capture some errors.
+3. tart up the stat/chan etc display to give more useful debugging info
28Oct00=======================================================================
1. updated show/sun and show/moon from stuff sent by Steve Franke K9AN
2. added show/call which queries jeifer.pineknot.com for any call in the
if ($action) {
my $q = qq{\$value = $action(\$value)};
eval $q;
+ } elsif (ref $value) {
+ my $dd = new Data::Dumper([$value]);
+ $dd->Indent(0);
+ $dd->Terse(1);
+ $dd->Quotekeys($] < 5.005 ? 1 : 0);
+ $value = $dd->Dumpxs;
}
$prompt = sprintf "%15s: %s", $prompt, $value;
return ($priv, $prompt);
foreach $field (sort {$ref->field_prompt($a) cmp $ref->field_prompt($b)} @fields) {
if (defined $ref->{$field}) {
my ($priv, $ans) = promptf($ref->field_prompt($field), $ref->{$field});
- push @out, $ans if ($self->priv >= $priv);
+ my @tmp;
+ if (length $ans > 79) {
+ my ($p, $a) = split /: /, $ans;
+ my $l = (length $p) + 2;
+ my $al = 79 - $l;
+ while (length $a > $al ) {
+ $a =~ s/^(.{$al})//;
+ push @tmp, "$p: $1";
+ $p = ' ' x ($l - 2);
+ }
+ push @tmp, "$p: $a" if length $a;
+ } else {
+ push @tmp, $ans;
+ }
+ push @out, @tmp if ($self->priv >= $priv);
}
}
return @out;
my $s = readfilestr($fn);
my $newin = eval $s;
dbg('conn', "$@") if $@;
- return bless [ @$in ], 'Filter::Old' if $in;
+ if ($in) {
+ $newin = bless {filter => $in, name => "$flag$call.pl" }, 'Filter::Old'
+ }
return $newin;
}
return undef;
sub write
{
my $self = shift;
-
- my $sort = shift;
- my $call = shift;
- my $fn = "$filterbasefn/$sort";
-
-
- # make the output directory
- mkdir $fn, 0777 unless -e $fn;
-
- # write out the file
- $fn = "$fn/$call.pl";
- unless (open FILTER, ">$fn") {
- warn "can't open $fn $!" ;
- return;
- }
-
- my $today = localtime;
- print FILTER "#!/usr/bin/perl
-#
-# Filter for $call stored $today
-#
-\$in = [
-";
+}
- my $ref;
- for $ref (@_) {
- my ($action, $field, $fieldsort, $comp, $actiondata) = @{$ref};
- print FILTER "\t[ $action, $field, $fieldsort,";
- if ($fieldsort eq 'n' || $fieldsort eq 'r') {
- print FILTER "[ ", join (',', $comp), " ],";
- } elsif ($fieldsort eq 'a') {
- my $f = $comp;
- print FILTER "'$f'";
- }
- print FILTER " ],\n";
- }
- print FILTER "];\n";
- close FILTER;
+sub print
+{
+ my $self = shift;
+ return $self->{name};
}
package Filter::Old;
#
sub it
{
- my $filter = shift; # this is now a bless ref of course but so what
+ my $self = shift;
+ my $filter = $self->{filter}; # this is now a bless ref of course but so what
my ($action, $field, $fieldsort, $comp, $actiondata);
my $ref;