From 8bc6d6e2f50c2986d2e431af9a994af687f27a40 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 2 Oct 2017 00:48:26 +1300 Subject: Change from print to log, add timestamp --- plugin/url_title.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugin/url_title.pm') diff --git a/plugin/url_title.pm b/plugin/url_title.pm index f36ad6d..1c376df 100644 --- a/plugin/url_title.pm +++ b/plugin/url_title.pm @@ -18,7 +18,7 @@ sub configure { sub message { - my ($self, $me, $who, $where, $raw_what, $what) = @_; + my ($self, $logger, $me, $who, $where, $raw_what, $what) = @_; my $url; if ($what =~ /(https?:\/\/[^ ]+)/i) { @@ -31,12 +31,12 @@ sub message my $response = $http->get($url); if (!$response->{success}) { - print "Something broke: $response->{reason}\n"; + $logger->("Something broke: $response->{reason}"); return; } if (!($response->{headers}->{"content-type"} =~ m,text/html ?,)) { - print("Not html, giving up now\n"); + $logger->("Not html, giving up now"); return; } -- cgit v1.1