X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=0c23663c415bf111e30f935f668369304a3e0054;hb=bdc2552d39834c58fd06e18272ba653726f59e6f;hp=990aa45d57d21f2035913aaad4d08f854fb0b30d;hpb=8f58735f5c9c090f2e5e00e05c7ad0834eccb741;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 990aa45d..0c23663c 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -44,7 +44,7 @@ $main::branch += $BRANCH; use vars qw($me $pc11_max_age $pc23_max_age $last_pc50 $last_hour $last10 %eph %pings %rcmds $ann_to_talk - %nodehops $baddx $badspotter $badnode $censorpc + %nodehops $baddx $badspotter $badnode $censorpc $rspfcheck $allowzero $decode_dk0wcy $send_opernam @checklist); $me = undef; # the channel id for this cluster @@ -61,7 +61,8 @@ $baddx = new DXHash "baddx"; $badspotter = new DXHash "badspotter"; $badnode = new DXHash "badnode"; $last10 = $last_pc50 = time; -$ann_to_talk = 0; +$ann_to_talk = 1; +$rspfcheck = 1; @checklist = ( @@ -275,7 +276,7 @@ sub start $self->tell_login('loginn'); # run a script send the output to the debug file - my $script = new Script(lc $call); + my $script = new Script(lc $call) || new Script('node_default'); $script->run($self) if $script; } @@ -316,6 +317,9 @@ sub normal SWITCH: { if ($pcno == 10) { # incoming talk + # rsfp check + return if $rspfcheck and !$self->rspfcheck(0, $field[6], $field[1]); + # will we allow it at all? if ($censorpc) { my @bad; @@ -384,6 +388,9 @@ sub normal } } + # rsfp check + return if $rspfcheck and !$self->rspfcheck(1, $field[7], $field[6]); + # if this is a 'nodx' node then ignore it if ($badnode->in($field[7])) { dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr'); @@ -513,6 +520,9 @@ sub normal } if ($pcno == 12) { # announces + + return if $rspfcheck and !$self->rspfcheck(1, $field[5], $field[1]); + # announce duplicate checking $field[3] =~ s/^\s+//; # remove leading blanks if (AnnTalk::dup($field[1], $field[2], $field[3])) { @@ -849,6 +859,8 @@ sub normal } } + return if $rspfcheck and !$self->rspfcheck(1, $field[8], $field[7]); + # do some de-duping my $d = cltounix($field[1], sprintf("%02d18Z", $field[2])); my $sfi = unpad($field[3]);