X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/825f81340a823c9626839fbba574e5a3d7c409fa..96566c33a79a1628a75bc573d924fd3be8b6b37d:/IkiWiki/Plugin/pinger.pm?ds=inline diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm index ea4f3e0dc..b2d54af8a 100644 --- a/IkiWiki/Plugin/pinger.pm +++ b/IkiWiki/Plugin/pinger.pm @@ -13,7 +13,7 @@ sub import { hook(type => "needsbuild", id => "pinger", call => \&needsbuild); hook(type => "preprocess", id => "ping", call => \&preprocess); hook(type => "delete", id => "pinger", call => \&ping); - hook(type => "change", id => "pinger", call => \&ping); + hook(type => "rendered", id => "pinger", call => \&ping); } sub getsetup () { @@ -72,7 +72,7 @@ sub ping { my $ua; eval q{use LWPx::ParanoidAgent}; if (!$@) { - $ua=LWPx::ParanoidAgent->new; + $ua=LWPx::ParanoidAgent->new(agent => $config{useragent}); } else { eval q{use LWP}; @@ -80,7 +80,7 @@ sub ping { debug(gettext("LWP not found, not pinging")); return; } - $ua=LWP::UserAgent->new; + $ua=useragent(); } $ua->timeout($config{pinger_timeout} || 15);