X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXChannel.pm;h=372599af1a3806dec7c1c37e540345ce58804e45;hb=8178d787d7cc8040fa8958197582bba5c80e6f59;hp=584015518e6ea2b93478b10660d80d7e60ac4da3;hpb=579810d363939640538f88a9caa86e01fe9c7709;p=spider.git diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 58401551..372599af 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -109,11 +109,14 @@ $count = 0; badcount => '1,Bad Word Count', edit => '7,Edit Function', registered => '9,Registered?,yesno', + prompt => '0,Required Prompt', + version => '1,Node Version', + build => '1,Node Build', ); use vars qw($VERSION $BRANCH); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); $main::build += $VERSION; $main::branch += $BRANCH; @@ -493,12 +496,12 @@ sub decode_input # the above regexp must work unless (defined $sort && defined $call && defined $line) { # $data =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg; - dbg("DUFF Line on $chcall: $data") if isdbg('err'); + dbg("DUFF Line on $chcall: $data"); return (); } if(ref($dxchan) && $call ne $chcall) { - dbg("DUFF Line come in for $call on wrong channel $chcall") if isdbg('err'); + dbg("DUFF Line come in for $call on wrong channel $chcall"); return(); } @@ -513,15 +516,16 @@ sub rspfcheck if ($nref && $dxchan) { if ($dxchan == $self) { return 1 unless $user; + return 1 if $user eq $node; my @users = $nref->users; return 1 if @users == 0 || grep $user eq $_, @users; - dbg("RSPF: $user not on $node") if isdbg('rspf'); + dbg("RSPF: $user not on $node") if isdbg('chanerr'); } else { - dbg("RSPF: Shortest path for $node is " . $nref->dxchan->{call}) if isdbg('rspf'); + dbg("RSPF: Shortest path for $node is " . $nref->dxchan->{call}) if isdbg('chanerr'); } } else { return 1 if $flag; - dbg("RSPF: required $node not found" ) if isdbg('rspf'); + dbg("RSPF: required $node not found" ) if isdbg('chanerr'); } return 0; } @@ -618,20 +622,23 @@ 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}}; + &$AUTOLOAD($self, @_); +# *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ; +# @_ ? $self->{$name} = shift : $self->{$name} ; }