allow someone to reject msgs from an interface call
authorminima <minima>
Fri, 24 Aug 2001 22:04:12 +0000 (22:04 +0000)
committerminima <minima>
Fri, 24 Aug 2001 22:04:12 +0000 (22:04 +0000)
Changes
msg/badmsg.pl.issue
perl/DXMsg.pm

diff --git a/Changes b/Changes
index 862bb96145c63f20c6ec086f7da3eeb5e5ffc27f..ea6a1c7a315d35161e52022f78e227f7ed56554a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+24Aug01=======================================================================
+1. Allow badmsg to reject on interface callsign ('I')
 20Aug01=======================================================================
 1. protect against PC41s with field[3] == field[2]
 2. Redo Julian stuff as proper objects
index 3b13e3bfc14c887eb7134129fa26a64539c26bd0..2e127c8c05f7ffebfbdf29dc5455a34bcd67a2fa 100644 (file)
@@ -7,10 +7,10 @@
 # The format of each line is as follows
 #
 #     type      source             pattern 
-#     P/B/F     T/F/O/S            regex  
+#     P/B/F     T/F/O/S/I          regex  
 #
 # type: P - private, B - bulletin (msg), F - file (ak1a bull)
-# source: T - to field, F - from field,  O - origin, S - subject 
+# source: T - to field, F - from field,  O - origin, S - subject, I - interface call 
 # pattern: a perl regex on the field requested
 #
 # Currently only type B and P msgs are affected by this code.
index f136b16e7b23750192b817f27055caf0592e8fef..f3c2172cfba7c45c70e7fa5d3c12353853dd2b92 100644 (file)
@@ -284,7 +284,7 @@ sub process
                                                $ref->swop_it($self->call);
                                                
                                                # look for 'bad' to addresses 
-                                               if ($ref->dump_it) {
+                                               if ($ref->dump_it($self->call)) {
                                                        $ref->stop_msg($self->call);
                                                        dbg("'Bad' message $ref->{to}") if isdbg('msg');
                                                        Log('msg', "'Bad' message $ref->{to}");
@@ -777,7 +777,7 @@ sub init
                }
                
                # delete any messages to 'badmsg.pl' places
-               if ($ref->dump_it) {
+               if ($ref->dump_it('')) {
                        dbg("'Bad' TO address $ref->{to}") if isdbg('msg');
                        Log('msg', "'Bad' TO address $ref->{to}");
                        $ref->del_msg;
@@ -992,6 +992,7 @@ sub forward_it
 sub dump_it
 {
        my $ref = shift;
+       my $call = shift;
        my $i;
        
        for ($i = 0; $i < @badmsg; $i += 3) {
@@ -1007,6 +1008,7 @@ sub dump_it
                $tested = $ref->{from} if $field eq 'F';
                $tested = $ref->{origin} if $field eq 'O';
                $tested = $ref->{subject} if $field eq 'S';
+               $tested = $call if $field eq 'I';
 
                if (!$pattern || $tested =~ m{$pattern}i) {
                        return 1;