X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXChannel.pm;h=536e7bb363dc3cea6e7e1cb3c9f7dc9a83f74119;hb=048adf1eb39f866e0968e1443fb7307ec5fdc4a6;hp=e6e0d1b42634e365022c66650788ce979c36e862;hpb=dbf7523a9b228dbdf1d03109afde351b8b194fab;p=spider.git diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index e6e0d1b4..536e7bb3 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -112,6 +112,7 @@ $count = 0; prompt => '0,Required Prompt', version => '1,Node Version', build => '1,Node Build', + verified => '9,Verified?,yesno', ); use vars qw($VERSION $BRANCH); @@ -219,6 +220,17 @@ sub get_all_user_calls return @out; } +# return a list of all node callsigns +sub get_all_node_calls +{ + my $ref; + my @out; + foreach $ref (values %channels) { + push @out, $ref->{call} if $ref->is_node; + } + return @out; +} + # obtain a channel object by searching for its connection reference sub get_by_cnum { @@ -425,6 +437,7 @@ sub disconnect 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(); @@ -622,20 +635,20 @@ sub broadcast_list } -no strict; +#no strict; sub AUTOLOAD { - my $self = shift; + no strict; my $name = $AUTOLOAD; return if $name =~ /::DESTROY$/; - $name =~ s/.*:://o; + $name =~ s/^.*:://o; confess "Non-existant field '$AUTOLOAD'" if !$valid{$name}; # 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}} ; - @_ ? $self->{$name} = shift : $self->{$name} ; + *$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}; + goto &$AUTOLOAD; }