diff options
| author | Obfuscoder | 2014-10-17 22:54:13 +0200 |
|---|---|---|
| committer | Obfuscoder | 2014-10-19 10:28:41 +0200 |
| commit | d84f1e1808b3252af83e4963eccfd1e4f19c5326 (patch) | |
| tree | 18b64164a95e6ba73e50d4ce9938e9760ad8a217 /scripts/ircgallery.pl | |
| parent | 263a56d196da657b72ccf2b195b50008d6a988dc (diff) | |
| download | scripts.irssi.org-d84f1e1808b3252af83e4963eccfd1e4f19c5326.tar.bz2 | |
Fix perlcritic issues for all scripts starting with e to l
Diffstat (limited to 'scripts/ircgallery.pl')
| -rw-r--r-- | scripts/ircgallery.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/ircgallery.pl b/scripts/ircgallery.pl index 38b48ff..c044a45 100644 --- a/scripts/ircgallery.pl +++ b/scripts/ircgallery.pl @@ -3,6 +3,7 @@ # version 1.13 # for irssi 0.8.0 by Timo Sirainen +use strict; use Symbol; use vars qw($VERSION %IRSSI); $VERSION = "1.13"; @@ -13,7 +14,7 @@ $VERSION = "1.13"; description => "Show IRC gallery (http://irc-galleria.net, finnish only) information on /WHOIS or /GALLERY", license => "Public Domain", url => "http://irssi.org/", - changed => "2002-03-04T22:47+0100"
+ changed => "2002-03-04T22:47+0100" ); @@ -42,6 +43,7 @@ sub get_view_url { # print the gallery information - assumes the file is in cache directory sub print_gallery { + my %print_notfound; my $nick = shift; my $found = 0; @@ -50,7 +52,7 @@ sub print_gallery { $. = "\n"; my $f = gensym; - if (!open($f, "$cache_path/$nick")) { + if (!open($f, "<", "$cache_path/$nick")) { Irssi::print("Couldn't open file $cache_path/$nick: $!", MSGLEVEL_CLIENTERROR); return; } @@ -204,7 +206,7 @@ sub parse_nicks { $gallery_nicks_time = time(); my $f = gensym; - if (!open($f, $filename)) { + if (!open($f, "<", $filename)) { Irssi::print("Couldn't open file $filename: $!", MSGLEVEL_CLIENTERROR); return; } @@ -243,7 +245,7 @@ sub download_nicklist { if (-d $cache_path) { unlink(<$cache_path/*>); } else { - mkdir($cache_path, 0700) || die "Can't create cache directory $cache_dir"; + mkdir($cache_path, 0700) || die "Can't create cache directory $cache_path"; } # we need the nick list, get it once per hour |
