From cb29c472a963d6264df4d144ebbd1fa6529472b5 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Sun, 27 Feb 2005 16:15:40 +0000 Subject: Fixed some error messages on spamcop script svn path=/z-distfiles/; revision=96 --- z-distfiles/scripts-gw-1.1/spamcop | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/z-distfiles/scripts-gw-1.1/spamcop b/z-distfiles/scripts-gw-1.1/spamcop index 9b5c258..28a1e60 100755 --- a/z-distfiles/scripts-gw-1.1/spamcop +++ b/z-distfiles/scripts-gw-1.1/spamcop @@ -4,6 +4,10 @@ use HTML::Form; use LWP; use HTTP::Cookies; +sub get_all_links( $ ); +sub get_login_cookie( $$$$ ); +sub report_all_spam( $$ ); + if ($ARGV[0] eq "--help" ) { print 'usage: spamcop {EMAIL-FOLDER}'."\n"; print 'usage: spamcop /home/heinz/mail/Inbox/.SpamCop'."\n"; @@ -157,7 +161,8 @@ sub report_all_spam ( $$ ) foreach my $sendform (@forms) { - if ($sendform->attr( 'name' ) eq 'sendreport') + if (defined $sendform->attr( 'name' ) + and $sendform->attr( 'name' ) eq 'sendreport') { $response = $ua->request($sendform->click()); if ( $response->is_error() ) -- cgit v1.2.3-65-gdbad