X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2e2c3cd9e085aea93c379f37c4bfa4d740e954d2..041e3c3c5dd3333304c21c0a8145986014544a7d:/IkiWiki/Plugin/blogspam.pm diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm index 3eb4cf8b3..3835f52ca 100644 --- a/IkiWiki/Plugin/blogspam.pm +++ b/IkiWiki/Plugin/blogspam.pm @@ -57,18 +57,10 @@ sub checkconfig () { }; error $@ if $@; - eval q{use LWPx::ParanoidAgent}; - if (!$@) { - $client=LWPx::ParanoidAgent->new(agent => $config{useragent}); - } - else { - eval q{use LWP}; - if ($@) { - error $@; - return; - } - $client=useragent(); - } + # Using the for_url parameter makes sure we crash if used + # with an older IkiWiki.pm that didn't automatically try + # to use LWPx::ParanoidAgent. + $client=useragent(for_url => $config{blogspam_server}); } sub checkcontent (@) {