summaryrefslogtreecommitdiffstats
path: root/scripts/fserve.pl
diff options
context:
space:
mode:
authorObfuscoder2014-10-17 22:54:13 +0200
committerObfuscoder2014-10-19 10:28:41 +0200
commitd84f1e1808b3252af83e4963eccfd1e4f19c5326 (patch)
tree18b64164a95e6ba73e50d4ce9938e9760ad8a217 /scripts/fserve.pl
parent263a56d196da657b72ccf2b195b50008d6a988dc (diff)
downloadscripts.irssi.org-d84f1e1808b3252af83e4963eccfd1e4f19c5326.tar.bz2
Fix perlcritic issues for all scripts starting with e to l
Diffstat (limited to 'scripts/fserve.pl')
-rw-r--r--scripts/fserve.pl18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/fserve.pl b/scripts/fserve.pl
index 607f91c..0fdc350 100644
--- a/scripts/fserve.pl
+++ b/scripts/fserve.pl
@@ -591,7 +591,7 @@ sub sig_dcc_connected
if ($motdfile_modified < $lm) {
$motdfile_modified = $lm;
@motd = ();
- open(FILE, $f);
+ open(FILE, "<", $f);
while(<FILE>) {
chomp;
s/\t/ /g;
@@ -2937,7 +2937,7 @@ sub display_file ($$) {
return;
}
- unless (open (RFILE, $filepath)) {
+ unless (open (RFILE, "<", $filepath)) {
send_user_msg($server_tag, $irc_nick, "Couldn't open file: " .
"'$fs_prefs{clr_hi}$ufile$fs_prefs{clr_txt}'!");
print_msg("Could not open file $filepath");
@@ -3263,7 +3263,7 @@ sub save_config
{
my $f = $conffile;
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!open(FILE, ">$f")) {
+ if (!open(FILE, ">", $f)) {
print_msg("Unable to open $f for writing!");
return 1;
}
@@ -3301,7 +3301,7 @@ sub save_config
###############################################################################
sub load_distro {
my $file = $_[0];
- if (!open(FILE, "<$file")) {
+ if (!open(FILE, "<", $file)) {
print_msg("Unable to open $file for reading!");
return 0;
}
@@ -3336,7 +3336,7 @@ sub save_distro
my $f = $fs_prefs{distro_file};
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!open(FILE, ">$f")) {
+ if (!open(FILE, ">", $f)) {
print_msg("Unable to open $f for writing!");
return 1;
}
@@ -3359,7 +3359,7 @@ sub load_config
my $f = $conffile;
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!open(FILE, "<$f")) {
+ if (!open(FILE, "<", $f)) {
print_msg("Unable to open $f for reading!");
return 1;
}
@@ -3418,7 +3418,7 @@ sub save_queue
my $f = $fs_prefs{queuefile};
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!open(FILE, ">$f")) {
+ if (!open(FILE, ">", $f)) {
print_msg("Unable to open $f for writing!");
return 1;
}
@@ -3468,7 +3468,7 @@ sub load_queue
my $f = $fs_prefs{queuefile};
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!open(FILE, "<$f")) {
+ if (!open(FILE, "<", $f)) {
print_msg("Unable to open $f for reading!");
return 1;
}
@@ -3565,7 +3565,7 @@ sub print_log
{
my $f = $fs_prefs{log_name};
$f =~ s/\$IRSSI/Irssi::get_irssi_dir()/e or $f =~ s/~/$ENV{"HOME"}/;
- if (!$logfp && $fs_prefs{log_name} && open(LOGFP, ">>$f")) {
+ if (!$logfp && $fs_prefs{log_name} && open(LOGFP, ">>", $f)) {
$logfp = \*LOGFP;
select((select($logfp), $|++)[0]);
}