chiark
/
gitweb
/
~webstump
/
modbot-mtm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Actual error messages
[modbot-mtm.git]
/
stump
/
bin
/
suspicious.pl
diff --git
a/stump/bin/suspicious.pl
b/stump/bin/suspicious.pl
index 38b94f8df5d567a4fc0d0cd6999189487f5841fd..6870d89d4c95b382c433707a5aae9f1b3530c536 100755
(executable)
--- a/
stump/bin/suspicious.pl
+++ b/
stump/bin/suspicious.pl
@@
-29,11
+29,11
@@
print STDERR "Needack = $needAck\n";
sub readMessage {
$IsBody = 0;
sub readMessage {
$IsBody = 0;
-open IWJL, ">>/home/webstump/t.log";
-print IWJL "=========== SUSPICIOUS READMESSAGE\n";
+
#
open IWJL, ">>/home/webstump/t.log";
+
#
print IWJL "=========== SUSPICIOUS READMESSAGE\n";
while( <STDIN> ) {
while( <STDIN> ) {
-print IWJL "SsRm $_\n";
+
#
print IWJL "SsRm $_\n";
$Body .= $_;
$Body .= $_;
@@
-123,13
+123,13
@@
$MessageNumber = time . $$;
print STDERR "Opening $MNG_ROOT/tmp/messages/$MessageNumber\n";
print STDERR "Opening $MNG_ROOT/tmp/messages/$MessageNumber\n";
-open( MESSAGE, "> $MNG_ROOT/tmp/messages/$MessageNumber" );
-print MESSAGE $Body;
-close( MESSAGE );
+open( MESSAGE, "> $MNG_ROOT/tmp/messages/$MessageNumber" )
or die $!
;
+print MESSAGE $Body
or die $!
;
+close( MESSAGE )
or die $!
;
$Subject = "Subject: try again" if( !$Subject );
$Subject = "Subject: try again" if( !$Subject );
-open( COMMAND, "| sendmail -odb -oi $moderator > /dev/null" );
+open( COMMAND, "| sendmail -odb -oi $moderator > /dev/null" )
or die $!
;
print COMMAND "From: $ENV{'DECISION_ADDRESS'}
$Subject ::$Prefix/$MessageNumber
print COMMAND "From: $ENV{'DECISION_ADDRESS'}
$Subject ::$Prefix/$MessageNumber
@@
-147,14
+147,14
@@
THE FIRST LINE, choosing LITERALLY from ONE of the following options
approve
preapprove
approve
preapprove
-";
+"
or die $!;
;
-open( REASONS, "$MNG_ROOT/etc/rejection-reasons.lst" );
+open( REASONS, "$MNG_ROOT/etc/rejection-reasons.lst" )
or die $!
;
while( <REASONS> ) {
($reason, $explanation) = split( /::/, $_ );
while( <REASONS> ) {
($reason, $explanation) = split( /::/, $_ );
- print COMMAND "reject $reason\n";
+ print COMMAND "reject $reason\n"
or die $!
;
}
}
-close( REASONS );
+close( REASONS )
or die $!
;
print COMMAND "
print COMMAND "
@@
-165,15
+165,15
@@
before approve, preapprove, or reject.
Message follows:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Message follows:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-";
+"
or die $!
;
-print COMMAND $Body;
-close( COMMAND );
+print COMMAND $Body
or die $!
;
+close( COMMAND )
or die "$? $!"
;
if( $needAck eq "yes" ) {
open( ACK, "| modack.received" ) or die $!;
if( $needAck eq "yes" ) {
open( ACK, "| modack.received" ) or die $!;
- print ACK $Body;
- close( ACK ) or die
$!
;
+ print ACK $Body
or die $!
;
+ close( ACK ) or die
"$? $!"
;
}
1;
}
1;