aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/blogspam.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/blogspam.pm')
-rw-r--r--IkiWiki/Plugin/blogspam.pm16
1 files changed, 4 insertions, 12 deletions
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 (@) {