X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?a=blobdiff_plain;f=stump%2Fbin%2Fsubmission.pl;h=f31961774a9fafbee80594f9f3735d81c8abe477;hb=8d19917103cd5b8185056a6ebfe951a45535c3ea;hp=8a7331a88a58044f5f8e7e74710a9f4a76fb759c;hpb=6ec0f60e69748b1ace4975939331fd4716f78af6;p=modbot-uram.git diff --git a/stump/bin/submission.pl b/stump/bin/submission.pl index 8a7331a..f319617 100755 --- a/stump/bin/submission.pl +++ b/stump/bin/submission.pl @@ -133,7 +133,7 @@ print STDERR "Too many newsgroups\n"; # checks if poster needs acknowledgment of receipt # sub checkAck { - if( &nameIsInList( $From, "noack.list" ) ) { + if( &nameIsInListExactly( $From, "noack.list" ) ) { $needAck = "no"; } else { $needAck = "yes"; @@ -163,8 +163,8 @@ print STDERR "FromSig = $FromSig, good = $good\n" if $FromSig; return "$Command_Reject signature Your PGP signature does NOT match, or is not in our keyring"; } - if( &nameIsInList( $From, $PGPMustList ) || - ($PGPCheckPreapproved && &nameIsInList($From, $goodGuys) ) ) { + if( &nameIsInListRegexp( $From, $PGPMustList ) || + ($PGPCheckPreapproved && &nameIsInListExactly($From, $goodGuys) ) ) { if( $FromSig eq "" ) { return "$Command_Reject signature You are REQUIRED to sign your posts."; } @@ -214,7 +214,7 @@ sub Filter { } } - if( &nameIsInList( $From, $badGuys ) ) { + if( &nameIsInListRegexp( $From, $badGuys ) ) { return "$Command_Reject blocklist"; } @@ -223,7 +223,7 @@ sub Filter { # "suspicious" and will be forwarded to a humen mod for review. # As an example of a bad word may be "MAKE MONEY FAST - IT REALLY WORKS!!!" # - if( $badWord = &nameIsInList( $Body, $badWords ) ) { + if( $badWord = &nameIsInListRegexp( $Body, $badWords ) ) { print STDERR "BAD WORD $badWord FOUND!!!\n"; return $Command_Suspicious; # messages from approved guys MAY be # suspicious if they write about @@ -237,7 +237,7 @@ print STDERR "BAD WORD $badWord FOUND!!!\n"; } # Checking preapproved list - if( &nameIsInList( $From, $goodGuys ) ) { + if( &nameIsInListExactly( $From, $goodGuys ) ) { local( $from ) = $From; $from =~ s/^From: //i; print STDERR "$from is a PREAPPROVED person\n"; return $Command_Approve;