Changeset 23947
- Timestamp:
- 11/17/08 20:03:54 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Morris/trunk/lib/Morris/Plugin/Channel/PeekURL.pm
r23946 r23947 11 11 is => 'rw', 12 12 isa => 'LWP::UserAgent', 13 default => sub { LWP::UserAgent->new( agent => 'Morris IRCBot/peekURL plugin') },13 default => sub { LWP::UserAgent->new(timeout => 10, agent => 'Morris IRCBot/peekURL plugin') }, 14 14 ); 15 15 … … 42 42 my $res = $self->user_agent->get($uri); 43 43 if (! $res->is_success ) { 44 $self->irc_notice($args->{message}->channel, $res->message); 44 $self->connection->irc_notice({ 45 channel => $args->{message}->channel, 46 message => $res->message 47 }); 48 next; 49 } 50 51 if ( $res->content_type !~ /\btext\/html\b/i) { 52 $self->connection->irc_notice({ 53 channel => $args->{message}->channel, 54 message => sprintf( "%s [%s]", $uri, $res->content_type ) 55 }); 45 56 next; 46 57 } … … 54 65 ); 55 66 $p->strict_comment(1); 56 $p->parse_content($res-> content);67 $p->parse_content($res->decoded_content); 57 68 my $title = $p->find_by_tag_name('title'); 58 69 if ($title) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)