prompt => '0,Required Prompt',
version => '1,Node Version',
build => '1,Node Build',
+ verified => '9,Verified?,yesno',
+ newroute => '1,New Style Routing,yesno',
);
use vars qw($VERSION $BRANCH);
return @_ ? $self->{'sort'} = shift : $self->{'sort'} ;
}
+# find out whether we are prepared to believe this callsign on this interface
+sub is_believed
+{
+ my $self = shift;
+ my $call = shift;
+
+ return grep $call eq $_, $self->user->believe;
+}
+
# handle out going messages, immediately without waiting for the select to drop
# this could, in theory, block
sub send_now
my $self = shift;
my $user = $self->{user};
+ main::clean_inqueue($self); # clear out any remaining incoming frames
$user->close() if defined $user;
$self->{conn}->disconnect;
$self->del();
{
my ($self, $flag, $node, $user) = @_;
my $nref = Route::Node::get($node);
- my $dxchan = $nref->dxchan if $nref;
+ my $dxchan = $nref->bestdxchan if $nref;
if ($nref && $dxchan) {
if ($dxchan == $self) {
return 1 unless $user;
return 1 if @users == 0 || grep $user eq $_, @users;
dbg("RSPF: $user not on $node") if isdbg('chanerr');
} else {
- dbg("RSPF: Shortest path for $node is " . $nref->dxchan->{call}) if isdbg('chanerr');
+ dbg("RSPF: Shortest path for $node is " . $nref->bestdxchan->{call}) if isdbg('chanerr');
}
} else {
return 1 if $flag;
#no strict;
sub AUTOLOAD
{
- my $self = shift;
no strict;
my $name = $AUTOLOAD;
return if $name =~ /::DESTROY$/;
# this clever line of code creates a subroutine which takes over from autoload
# from OO Perl - Conway
*$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}};
- &$AUTOLOAD($self, @_);
-# *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
-# @_ ? $self->{$name} = shift : $self->{$name} ;
+ goto &$AUTOLOAD;
}