summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bandwidth.pl2
-rw-r--r--scripts/beep.pl4
-rw-r--r--scripts/beep_beep.pl5
-rw-r--r--scripts/bitlbee_join_notice.pl2
-rw-r--r--scripts/blowjob.pl10
-rw-r--r--scripts/buf.pl17
-rw-r--r--scripts/centericq.pl15
-rw-r--r--scripts/cgrep.pl1
-rw-r--r--scripts/chanshare.pl3
-rw-r--r--scripts/clones.pl4
-rw-r--r--scripts/colorkick.pl2
-rw-r--r--scripts/connectcmd.pl4
-rw-r--r--scripts/cron.pl4
-rw-r--r--scripts/dcc_ip.pl1
-rw-r--r--scripts/dccmove.pl1
-rw-r--r--scripts/dccstat.pl1
-rw-r--r--scripts/deliciousurl.pl2
-rw-r--r--scripts/df.pl2
-rw-r--r--scripts/dictcomplete.pl2
-rw-r--r--scripts/doc.pl4
20 files changed, 48 insertions, 38 deletions
diff --git a/scripts/bandwidth.pl b/scripts/bandwidth.pl
index c9964da..a614d17 100644
--- a/scripts/bandwidth.pl
+++ b/scripts/bandwidth.pl
@@ -43,7 +43,7 @@ sub get_stats
my ($old_in, $old_out) = ($last_in, $last_out);
my @localstats;
- if (open my $fh, "$command|")
+ if (open my $fh, q{-|}, $command)
{
@localstats = <$fh>;
close $fh;
diff --git a/scripts/beep.pl b/scripts/beep.pl
index 5fb3275..0bc5c53 100644
--- a/scripts/beep.pl
+++ b/scripts/beep.pl
@@ -1,6 +1,8 @@
# $Id: beep.pl,v 1.9 2002/07/04 13:18:02 jylefort Exp $
+use strict;
use Irssi 20020121.2020 ();
+use vars qw($VERSION %IRSSI);
$VERSION = "1.01";
%IRSSI = (
authors => 'Jean-Yves Lefort',
@@ -28,8 +30,6 @@ $VERSION = "1.01";
#
# 2002-01-24 initial release
-use strict;
-
sub beep {
my $server = Irssi::active_server;
if ($server && ! $server->{usermode_away}
diff --git a/scripts/beep_beep.pl b/scripts/beep_beep.pl
index be54244..2c139ab 100644
--- a/scripts/beep_beep.pl
+++ b/scripts/beep_beep.pl
@@ -11,6 +11,8 @@
# added > /dev/null, thx to Luis Oliveira
# fixed timeout handling bug, thx to frizop@charter.net
+use strict;
+use vars qw($VERSION %IRSSI);
$VERSION = "0.10";
%IRSSI = (
authors => "Georg Lukas",
@@ -23,7 +25,8 @@ $VERSION = "0.10";
use Irssi;
-my $might_beep = 1, $to_tag;
+my $might_beep = 1;
+my $to_tag;
sub beep_overflow_timeout() {
$might_beep = 1;
diff --git a/scripts/bitlbee_join_notice.pl b/scripts/bitlbee_join_notice.pl
index 6644895..6a254a7 100644
--- a/scripts/bitlbee_join_notice.pl
+++ b/scripts/bitlbee_join_notice.pl
@@ -9,7 +9,7 @@
# /statusbar window add join_notice
# use Data::Dumper;
-#use strict;
+use strict;
use Irssi::TextUI;
#use Irssi::Themes;
use Data::Dumper;
diff --git a/scripts/blowjob.pl b/scripts/blowjob.pl
index 27e2fcc..9e24111 100644
--- a/scripts/blowjob.pl
+++ b/scripts/blowjob.pl
@@ -96,13 +96,13 @@ sub loadconf
{
my $fconf =Irssi::get_irssi_dir()."/blowjob.conf";
my @conf;
- open (CONF, "<$fconf");
+ open (CONF, q{<}, $fconf);
if (!( -f CONF)) {
Irssi::print("\00305> $fconf not found, setting to defaults\n");
Irssi::print("\00305> creating $fconf with default values\n\n");
close(CONF);
- open(CONF,">$fconf");
+ open(CONF, q{>}, $fconf);
print CONF "key: $key\n";
print CONF "header: $header\n";
print CONF "wildcardserver: $enableWildcard\n";
@@ -144,7 +144,7 @@ my $gparanoia=$paranoia;
sub loadkeys
{
if ( -e "$kfile" ) {
- open (KEYF, "<$kfile");
+ open (KEYF, q{<}, $kfile);
@keys = <KEYF>;
close (KEYF);
}
@@ -203,7 +203,7 @@ sub setkey
# Note, place of paranoia has changed!
my $line="$curserv:$curchan:$fparanoia:$key";
- open (KEYF, ">$kfile");
+ open (KEYF, q{>}, $kfile);
foreach(@keys) {
s/\n//g;
if (/^$curserv\:$curchan\:/) {
@@ -231,7 +231,7 @@ sub delkey
my $serv;
my $chan;
- open (KEYF, ">$kfile");
+ open (KEYF, q{>}, $kfile);
foreach(@keys) {
s/\n//g;
($serv,$chan)=/^(.*?)\:(.*?)\:/;
diff --git a/scripts/buf.pl b/scripts/buf.pl
index 43b4b3d..da50e82 100644
--- a/scripts/buf.pl
+++ b/scripts/buf.pl
@@ -40,7 +40,7 @@ use Data::Dumper;
my %suppress;
sub upgrade {
- open BUF, sprintf('>%s/scrollbuffer', get_irssi_dir) or die $!;
+ open BUF, q{>}, sprintf('%s/scrollbuffer', get_irssi_dir) or die $!;
print BUF join("\0", map $_->{server}->{address} . $_->{name}, channels), "\n";
for my $window (windows) {
next unless defined $window;
@@ -66,7 +66,7 @@ sub upgrade {
}
sub restore {
- open BUF, sprintf('<%s/scrollbuffer', get_irssi_dir) or die $!;
+ open BUF, q{<}, sprintf('%s/scrollbuffer', get_irssi_dir) or die $!;
my @suppress = split /\0/, <BUF>;
if (settings_get_bool 'upgrade_suppress_join') {
chomp $suppress[-1];
@@ -98,14 +98,13 @@ sub restore {
sub suppress {
my ($first, $second) = @_;
- return
- unless scalar keys %suppress
- and settings_get_bool 'upgrade_suppress_join';
- my $key = $first->{address} .
- (grep { (s/^://, /^[#!+&]/) } split ' ', $second)[0];
+ return unless scalar keys %suppress and settings_get_bool 'upgrade_suppress_join';
+ my $key_part = (grep { /^:?[#!+&]/ } split ' ', $second)[0];
+ $key_part =~ s/^://;
+ my $key = $first->{address} . $key_part;
if (exists $suppress{$key} and $suppress{$key}--) {
- signal_stop();
- delete $suppress{$key} unless $suppress{$key};
+ signal_stop();
+ delete $suppress{$key} unless $suppress{$key};
}
}
diff --git a/scripts/centericq.pl b/scripts/centericq.pl
index 0b24a69..a1d250b 100644
--- a/scripts/centericq.pl
+++ b/scripts/centericq.pl
@@ -1,5 +1,6 @@
# $Id: centericq.pl,v 1.0.0 2002/10/19 13:15:49 Garion Exp $
-
+use strict;
+use vars qw($VERSION %IRSSI);
$VERSION = "1.0.0";
%IRSSI = (
authors => "Joost \"Garion\" Vunderink",
@@ -144,7 +145,7 @@ sub update_statusbar_item {
foreach $key(@keys) {
if ($numunreads{$key} > 0) {
#Irssi::print("$friendnick{$key} has $numunreads{$key} unreads.");
- $status .= $friendnick{$key} . "-" . $numunreads{$key} . ",";
+ $status .= $friendnicks{$key} . "-" . $numunreads{$key} . ",";
}
}
$status =~ s/,$//;
@@ -182,7 +183,7 @@ sub init {
}
my ($icqfriends, $msnfriends) = (0, 0);
- while ($filename = readdir(ICQDIR)) {
+ while (my $filename = readdir(ICQDIR)) {
# ICQ friends
if ($filename =~ /^[0-9]+$/ && $filename !~ /^0$/) {
$icqfriends++;
@@ -209,7 +210,7 @@ sub init_friend {
$lastreads{$friend} = get_lastread($friend);
$numunreads{$friend} = get_numunreads($friend);
#$filesizes{$friend} = get_filesize($friend);
- $friendnick{$friend} = get_nickname($friend);
+ $friendnicks{$friend} = get_nickname($friend);
$historyts{$friend} = get_historyts($friend);
#Irssi::print("Initilialized $friendnick{$friend}.");
}
@@ -221,7 +222,7 @@ sub get_lastread {
my ($friend) = @_;
my $lastreadfile = $icqdir . "/" . $friend . "/lastread";
- open(F, "<$lastreadfile") || return 0; #die("Could not open $lastreadfile.");;
+ open(F, "<", $lastreadfile) || return 0; #die("Could not open $lastreadfile.");;
my $lastrd = <F>;
close(F);
chop($lastrd);
@@ -242,7 +243,7 @@ sub get_numunreads {
}
my $msgfile = $icqdir . "/" . $friend . "/history";
- open(F, "<$msgfile") || return 0; #die("Could not open $msgfile.");
+ open(F, "<", $msgfile) || return 0; #die("Could not open $msgfile.");
my @lines = <F>;
chop(@lines);
close(F);
@@ -300,7 +301,7 @@ sub get_nickname {
my ($friend) = @_;
my $infofile = $icqdir . "/" . $friend . "/info";
- open(F, "<$infofile") || return $friend; #die("Could not open $msgfile.");
+ open(F, "<", $infofile) || return $friend; #die("Could not open $msgfile.");
my @lines = <F>;
chop(@lines);
close(F);
diff --git a/scripts/cgrep.pl b/scripts/cgrep.pl
index 7ec2304..f55f86e 100644
--- a/scripts/cgrep.pl
+++ b/scripts/cgrep.pl
@@ -18,6 +18,7 @@
#
################################################################################
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
use integer;
diff --git a/scripts/chanshare.pl b/scripts/chanshare.pl
index fcd862d..8d19057 100644
--- a/scripts/chanshare.pl
+++ b/scripts/chanshare.pl
@@ -30,6 +30,7 @@
# Supports for limiting searches only to specified ircnets and
# channels. Some cleanups..
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "0.3";
@@ -40,7 +41,7 @@ $VERSION = "0.3";
description => "/CHANSHARE - display people who are in more than one channel with you",
license => "Public Domain",
url => "http://irssi.org/",
- changed => "2002-03-04T22:47+0100",
+ changed => "2002-03-04T22:47+0100",
changes => "v0.3 - Timo Sirainen tss\@iki.fi: Supports for limiting searches only to specified ircnets and channels. Some cleanups.."
);
diff --git a/scripts/clones.pl b/scripts/clones.pl
index 84ba59f..0175bd8 100644
--- a/scripts/clones.pl
+++ b/scripts/clones.pl
@@ -1,3 +1,5 @@
+use strict;
+use vars qw($VERSION %IRSSI);
use Irssi 20010920.0000 ();
$VERSION = "2.01";
%IRSSI = (
@@ -8,8 +10,6 @@ $VERSION = "2.01";
url => 'http://irssi.dgl.cx/',
);
-use strict;
-
sub cmd_clones {
my ($data, $server, $channel) = @_;
diff --git a/scripts/colorkick.pl b/scripts/colorkick.pl
index 8b07aa0..24b29fd 100644
--- a/scripts/colorkick.pl
+++ b/scripts/colorkick.pl
@@ -9,7 +9,7 @@
# colorkick_blink int 0: don't kick on blink
#
-
+use strict;
use Irssi;
use Irssi::Irc;
diff --git a/scripts/connectcmd.pl b/scripts/connectcmd.pl
index d4a4491..b2bbdc2 100644
--- a/scripts/connectcmd.pl
+++ b/scripts/connectcmd.pl
@@ -17,7 +17,7 @@ my %postconn_actions;
my %disconn_actions;
sub load_actions {
- open ACTIONS, "$ENV{HOME}/.irssi/connectcmd_actions";
+ open ACTIONS, q{<}, "$ENV{HOME}/.irssi/connectcmd_actions";
while (<ACTIONS>) {
my @lines = split "\n";
@@ -37,7 +37,7 @@ sub load_actions {
}
sub save_actions {
- open ACTIONS, ">$ENV{HOME}/.irssi/connectcmd_actions";
+ open ACTIONS, q{>}, "$ENV{HOME}/.irssi/connectcmd_actions";
foreach my $server (keys %preconn_actions) {
print ACTIONS "$server:preconn:$preconn_actions{$server}\n";
diff --git a/scripts/cron.pl b/scripts/cron.pl
index bd8d127..9e1d125 100644
--- a/scripts/cron.pl
+++ b/scripts/cron.pl
@@ -256,7 +256,7 @@ sub cmd_jobadd {
}
sub cmd_jobssave {
- if (not open (FILE, "> $savefile")) {
+ if (not open (FILE, ">", $savefile)) {
Irssi::print("Could not open file '$savefile': $!");
return;
}
@@ -275,7 +275,7 @@ sub cmd_jobssave {
}
sub cmd_jobsload {
- if (not open (FILE, "$savefile")) {
+ if (not open (FILE, q{<}, $savefile)) {
Irssi::print("Could not open file '$savefile': $!");
return;
}
diff --git a/scripts/dcc_ip.pl b/scripts/dcc_ip.pl
index 457c4d3..3c03bf3 100644
--- a/scripts/dcc_ip.pl
+++ b/scripts/dcc_ip.pl
@@ -20,6 +20,7 @@
#
##########
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.5';
diff --git a/scripts/dccmove.pl b/scripts/dccmove.pl
index 19a2ca9..6d4543b 100644
--- a/scripts/dccmove.pl
+++ b/scripts/dccmove.pl
@@ -5,6 +5,7 @@
# Copyright (C) 2003 by Peder Stray <peder@ninja.no>
#
+use strict;
use Irssi;
use vars qw{$VERSION %IRSSI};
($VERSION) = '$Revision: 1.4 $' =~ / (\d+\.\d+) /;
diff --git a/scripts/dccstat.pl b/scripts/dccstat.pl
index c34ee21..7b7dfd0 100644
--- a/scripts/dccstat.pl
+++ b/scripts/dccstat.pl
@@ -1,3 +1,4 @@
+use strict;
use Irssi::Irc;
use Irssi 20020217; # Irssi 0.8.0
use vars qw($VERSION %IRSSI);
diff --git a/scripts/deliciousurl.pl b/scripts/deliciousurl.pl
index 00dcf22..b296e06 100644
--- a/scripts/deliciousurl.pl
+++ b/scripts/deliciousurl.pl
@@ -4,6 +4,8 @@
##
########################################################################################################
+use strict;
+
BEGIN { $ENV{HARNESS_ACTIVE} = 1 }
use IO::Handle;
diff --git a/scripts/df.pl b/scripts/df.pl
index 46b6672..8b4f086 100644
--- a/scripts/df.pl
+++ b/scripts/df.pl
@@ -76,7 +76,7 @@ sub getDiskInfo()
my @list;
my $skip_line_one = 1;
- open(FID, "/bin/df -h|");
+ open(FID, "-|", "/bin/df");
while (<FID>)
{
if ($skip_line_one > 0)
diff --git a/scripts/dictcomplete.pl b/scripts/dictcomplete.pl
index e97f0a9..1f64e1b 100644
--- a/scripts/dictcomplete.pl
+++ b/scripts/dictcomplete.pl
@@ -24,7 +24,7 @@ my %index;
my $old = '';
my $start = 0;
my $pointer = 0;
- open(DICT, $file) or die $!;
+ open(DICT, q{<}, $file) or die $!;
while (<DICT>) {
chomp;
push @array, $_;
diff --git a/scripts/doc.pl b/scripts/doc.pl
index 2861b41..de0e3d6 100644
--- a/scripts/doc.pl
+++ b/scripts/doc.pl
@@ -202,7 +202,7 @@ sub load_doc {
@doc = ();
Irssi::print("Loading doc from $doc_file");
local *DOC;
- open(DOC,"$doc_file");
+ open(DOC, q{<}, $doc_file);
local $/ = "\n";
while (<DOC>) {
chop();
@@ -235,7 +235,7 @@ sub save_doc {
my $keyword="";
my $definition="";
if (-e $doc_file) {
- open(DOC,">$doc_file");
+ open(DOC, q{>}, $doc_file);
for ($x=0;$x < @doc;$x++) {
($keyword,$definition) = split /=/,$doc[$x],2;
print DOC "$keyword=$definition\n";