From f544b875fb8690ecf7afe8beb16ecf61c38ed37c Mon Sep 17 00:00:00 2001 From: eleksir Date: Sun, 29 Apr 2018 00:17:37 +0300 Subject: [PATCH] img-save.pl: fix typos, now it actually downloads links --- web_link_saver/img-save.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web_link_saver/img-save.pl b/web_link_saver/img-save.pl index 72ae3de..a554a58 100644 --- a/web_link_saver/img-save.pl +++ b/web_link_saver/img-save.pl @@ -10,7 +10,7 @@ sub logger($); my $HTINY = undef; my $HTINYS = undef; my $DEBUG = 0; -my $mc = '127.0.0.1:11211'; +my $mc = '127.0.0.1:11212'; eval { require HTTP::Tiny; # stock perl module, but some assholes from debian rip perl into modules, @@ -92,13 +92,13 @@ if (($HTINY == 0) or ($HTINYS == 0)) { # print "* wget detected at $wgetpath.\n"; while ( 1 ) { - my $memd = new Cache::Memcached { 'servers' => [ "$mc" ] }; + my $memd = new Cache::Memcached { 'servers' => [ $mc ] }; my $itemref = $memd->stats(['items']); - if (defined($itemref->{'hosts'}->{'$mc'}->{'items'}) - and (length($itemref->{'hosts'}->{'$mc'}->{'items'}) > 2)) { + if (defined($itemref->{'hosts'}->{$mc}->{'items'}) + and (length($itemref->{'hosts'}->{$mc}->{'items'}) > 2)) { - foreach my $stat (split("\n", $itemref->{'hosts'}->{'$mc'}->{'items'})) { + foreach my $stat (split("\n", $itemref->{'hosts'}->{$mc}->{'items'})) { my $slab; my $itemsamount; @@ -114,7 +114,7 @@ while ( 1 ) { my $cachedump = $memd->stats(["cachedump $slab $itemsamount"]); my @keys = map { (split(/ /))[1]; - } split(/\n/, $cachedump->{'hosts'}->{'$mc'}->{"cachedump $slab $itemsamount"}); + } split(/\n/, $cachedump->{'hosts'}->{$mc}->{"cachedump $slab $itemsamount"}); foreach my $key (@keys) { if (($key =~ /^irssi_/) or ($key =~ /^xchtlink_/)) {