+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
# 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.
$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}");
}
# 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;
sub dump_it
{
my $ref = shift;
+ my $call = shift;
my $i;
for ($i = 0; $i < @badmsg; $i += 3) {
$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;