diff options
Diffstat (limited to 'scripts/pggb_sound.pl')
| -rw-r--r-- | scripts/pggb_sound.pl | 8 |
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); |
