summaryrefslogtreecommitdiffstats
path: root/scripts/pggb_sound.pl
diff options
context:
space:
mode:
authorObfuscoder2014-10-19 11:54:16 +0200
committerObfuscoder2014-10-19 11:54:16 +0200
commitdd80027b51b3ee71027a2612595aee38e38c0d6e (patch)
tree0f0b84efd10e9288695d86b69de324c467fe4e7b /scripts/pggb_sound.pl
parent263a56d196da657b72ccf2b195b50008d6a988dc (diff)
downloadscripts.irssi.org-dd80027b51b3ee71027a2612595aee38e38c0d6e.tar.bz2
Fix perlcritic issues for all scripts starting with m to r
Diffstat (limited to 'scripts/pggb_sound.pl')
-rw-r--r--scripts/pggb_sound.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/pggb_sound.pl b/scripts/pggb_sound.pl
index dfb00f9..9cedcd1 100644
--- a/scripts/pggb_sound.pl
+++ b/scripts/pggb_sound.pl
@@ -79,9 +79,9 @@ sub find_wave {
unless ($sound =~ /^.*\.wav$/i) {$sound = $sound . ".*.wav"}
my $LISTING;
if ( -r $cachefile ) {
- if ($cachefile =~ /\.gz$/i) { open(LISTING, "zcat $cachefile |") }
- elsif ($cachefile =~ /\.bz2$/i) { open(LISTING, "bzcat $cachefile |") }
- else { open(LISTING, "cat $cachefile |") };
+ if ($cachefile =~ /\.gz$/i) { open(LISTING, "-|", "zcat $cachefile") }
+ elsif ($cachefile =~ /\.bz2$/i) { open(LISTING, "-|", "bzcat $cachefile") }
+ else { open(LISTING, "-|", "cat $cachefile") };
} else {
Irssi::print("Cache file not readable. Nani?!?");
return;}
@@ -206,7 +206,7 @@ sub sound_autoget {
my $tempsound = $wordlist[1];
$tempsound =~ s/[\r \001 \n]//;
IRC::print($tempsound);
- if (!open(TEMPFILE, $sounddir.$tempsound)) {
+ if (!open(TEMPFILE, "<", $sounddir.$tempsound)) {
IRC::send_raw("PRIVMSG $name :!$name $tempsound\r\n");
} else {
close(TEMPFILE);