diff options
Diffstat (limited to 'run/irc')
-rw-r--r-- | run/irc | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use LWP::UserAgent (); + +my $ua = LWP::UserAgent->new(timeout => 5); +$ua->ssl_opts(verify_hostname => 0); +$ua->env_proxy; +$ua->agent(''); + +my $a = 'https://netsplit.de/channels/details.php?room=%23perl&net=freenode'; +my $r = $ua->get($a); +die $r->status_line if not $r->is_success; + +if ($r->decoded_content =~ m{<img border="0" src="(/tmp/channels/.*?\.png)" alt="(.*?)"}) { + print <<HTML; +<a href="$a"><img border="0" src="https://netsplit.de$1" alt="$2"/></a> +HTML +} |