]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Fix perlcritic issues for all scripts starting with m to r
authorObfuscoder <redacted>
Sun, 19 Oct 2014 09:54:16 +0000 (11:54 +0200)
committerObfuscoder <redacted>
Sun, 19 Oct 2014 09:54:16 +0000 (11:54 +0200)
37 files changed:
scripts/autoopper.pl
scripts/mail.pl
scripts/mailcheck_imap.pl
scripts/mailcheck_mbox_flux.pl
scripts/mailcheck_pop3_kimmo.pl
scripts/mass_hilight_blocker.pl
scripts/mkshorterlink.pl
scripts/monitor.pl
scripts/mpg123.pl
scripts/my_beep.pl
scripts/mysqlurllogger.pl
scripts/nact.pl
scripts/nickban.pl
scripts/nickcolor.pl
scripts/nickserv.pl
scripts/nm.pl
scripts/noisyquery.pl
scripts/notes.pl
scripts/noticemove.pl
scripts/opnotice.pl
scripts/orphamp.pl
scripts/osd.pl
scripts/page-c0ffee.pl
scripts/page_reeler.pl
scripts/pager.pl
scripts/paste-derwan.pl
scripts/paste_kimmoke.pl
scripts/pggb_sound.pl
scripts/queryresume.pl
scripts/quitmsg.pl
scripts/quitrand.pl
scripts/quizgr.pl
scripts/randaway.pl
scripts/randname.pl
scripts/redirect.pl
scripts/relm.pl
scripts/remote.pl

index 435c696e68b8392f2810ce39f409772828fb2a76..061e5bc5f7ba745bbc3fd5d4d021d2fded54451f 100644 (file)
@@ -159,7 +159,7 @@ sub read_dynamic_hosts {
 # Save data to file
 sub cmd_save_autoop {
        my $file = Irssi::get_irssi_dir."/autoop";
-       open FILE, "> $file" or return;
+       open FILE, ">", "$file" or return;
 
        foreach my $item (@opitems) {
                printf FILE ("%s\t%s\t%s\n", $item->{mask}, $item->{chan}, $item->{dynamic});
@@ -172,7 +172,7 @@ sub cmd_save_autoop {
 # Load data from file
 sub cmd_load_autoop {
        my $file = Irssi::get_irssi_dir."/autoop";
-       open FILE, "< $file" or return;
+       open FILE, "<","$file" or return;
        undef @opitems if (@opitems);
 
        while (<FILE>) {
index 33b3c22e591522f5d80edca83c1074b26a9d7819..190c33afd346b5e84154c591b7385b061110eb1e 100644 (file)
@@ -1,3 +1,5 @@
+use strict;
+use vars qw($VERSION %IRSSI);
 $VERSION = "2.92";
 %IRSSI = (
     authors     => "Timo Sirainen, Matti Hiljanen, Joost Vunderink, Bart Matthaei",
@@ -114,7 +116,7 @@ sub mbox_count {
        $last_mtime = $mtime;
 
        my $f = gensym;
-       return 0 if (!open($f, $mailfile));
+       return 0 if (!open($f, "<", $mailfile));
 
        # count new mails only
        my $internal_removed = 0;
index 37652ff0b0183c82c35d07bdb41d3372cc7ce4d5..868734ba984e4da1c40593e084b4de3a1d7e2a6c 100644 (file)
@@ -3,6 +3,7 @@
 # Contains code from centericq.pl (public domain) and imapbiff (GPL) and
 # hence this is also GPL'd.
 
+use strict;
 use vars qw($VERSION %IRSSI);
 $VERSION = "0.5";
 %IRSSI = (
@@ -40,9 +41,6 @@ $VERSION = "0.5";
 
 use Irssi;
 use Irssi::TextUI;
-
-
-use strict;
 use IO::Socket;
 
 # TODO : avoid requiring SSL when it's not in use?
index 2b91c4a3091920ed9a95f755e935d8bbe1e99926..dea47f31a9a7b10250f618778bffa0e520981d92 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/perl -w
 
+use strict;
 use Irssi;
 
 use vars qw($VERSION %IRSSI);
@@ -14,11 +15,9 @@ $VERSION = "0.1";
     changed     => "Mon Mar  4 23:25:18 EET 2002"
 );
 
-use strict;
-
 sub getMessages( $ ) {
   local *F;
-  open(F, $_[0]) or return ();
+  open(F, "<", $_[0]) or return ();
   my $inHeaders = 0;
   my $headers;
   my %result = ();
index 43bd6646ee210a3390c473663bd0d50b712104bb..24989fcaac8c1aa8c4c4921e3af80331e68c0a11 100644 (file)
@@ -8,6 +8,7 @@
 # >install Net::POP3
 #
 
+use strict;
 use Irssi;
 use Net::POP3;
 use vars qw($VERSION %IRSSI);
@@ -23,17 +24,16 @@ $VERSION = '0.5';
 );
 
 
-
-
+my (%_mailcount, %_mailchecktimer);
 
 sub cmd_checkmail
 {
        my $args = shift;
        my ($user, $pass, $host) = split(/\;/, $args);
-       my $i, $from, $subject, $head;
+       my ($i, $from, $subject, $head);
        my $POP3TIMEOUT = Irssi::settings_get_int("pop3_timeout");
-        my $pop = Net::POP3->new( $host, Timeout => $POP3TIMEOUT );
-       $count = $pop->login($user, $pass);
+    my $pop = Net::POP3->new( $host, Timeout => $POP3TIMEOUT );
+       my $count = $pop->login($user, $pass);
 
        if (!$count || !$pop)
        {
@@ -83,18 +83,18 @@ sub cmd_mail
        my $args = shift;
        my (@arg) = split(/\s+/, $args);
 
-       if ((@arg[0] eq "add") && @arg[1] && @arg[2])
+       if (($arg[0] eq "add") && $arg[1] && $arg[2])
        {
-               if ($_mailchecktimer{@arg[1]})
+               if ($_mailchecktimer{$arg[1]})
                {
-                       Irssi::print("Account " . @arg[1] . " is already being monitored.");
+                       Irssi::print("Account " . $arg[1] . " is already being monitored.");
                }
                else
                {
-                       start_check(@arg[1], @arg[2]);
+                       start_check($arg[1], $arg[2]);
                }
        }
-       elsif (@arg[0] eq "list")
+       elsif ($arg[0] eq "list")
        {
                Irssi::print("Active POP3 Accounts Being Monitored:");
                foreach (keys %_mailchecktimer)
index d5908abba7c94b6cd7398de4575c6189b2bd41a7..a5611a389028a62c9725c107350e10c3a8b61818 100644 (file)
@@ -15,6 +15,7 @@
 # * 30.05.2004
 # first version of the script
 
+use strict;
 use Irssi;
 use vars qw($VERSION %IRSSI); 
 $VERSION = "0.2";
@@ -39,7 +40,7 @@ sub sig_printtext {
       my $server  =  $dest->{server};  # get server and channel for target
       my $channel =  $server->channel_find($dest->{target});
       
-      foreach $nick ($channel->nicks()) # walk through nicks
+      foreach my $nick ($channel->nicks()) # walk through nicks
         {
           $nick = $nick->{nick};
           $nick =~ s/([\]\[])/\\$1/g;  # ']' and '[' need masking
index 5add6d62c59e1ef33058257cbafc5c0fe20290dd..6199608952826ab3b1916b7b3f5778c0de0402ed 100644 (file)
@@ -14,8 +14,6 @@ use LWP::UserAgent;
 use strict;
 use vars qw($VERSION %IRSSI);
 
-$VERSION = "0.3";
-
 %IRSSI = (
          'authors'     => 'Gergely Nagy',
          'contact'     => 'algernon\@bonehunter.rulez.org',
@@ -165,7 +163,7 @@ sub load_unshortlist {
        my $count = 0;
        local *CONF;
        
-       open CONF, "< $file";
+       open CONF, "<", $file;
        while (<CONF>)
        {
                $noshort{$_} = 1;
@@ -181,7 +179,7 @@ sub save_unshortlist {
        my $file = Irssi::get_irssi_dir."/unshortlist";
        local *CONF;
 
-       open CONF, "> $file";
+       open CONF, ">", $file;
        foreach (keys %noshort)
        {
                print CONF $_ if ($noshort{$_});
index adbb8f1805ee8d75d87e62b728c42d890ac70377..bad1cd81b5d1bb4de3ffe7b379eb051d3f290279 100644 (file)
@@ -351,7 +351,7 @@ sub cmd_monitor_save {
        #my ($data, $server, $item) = @_;
        my $file = Irssi::get_irssi_dir."/monitor";
        my ($net, $n, $k);
-       open FILE, "> $file" or return;
+       open FILE, ">", $file or return;
        foreach $net (keys %monitorlist) {
                foreach $n (keys %{$monitorlist{$net}}) {
                        $monitorlist{$net}{$n}{lastseen} = time() if $monitorlist{$net}{$n}{mask_online};
@@ -369,7 +369,7 @@ sub cmd_monitor_load {
        #my ($data, $server, $item) = @_;
        my $file = Irssi::get_irssi_dir."/monitor";
 
-       open FILE, "< $file" or return;
+       open FILE, "<", $file or return;
        %monitorlist = ();
        while (<FILE>) {
                chomp;
index e52dc1330c52943ed97cf0f945f3a442d4b6e8b4..f0d4d21d4cddf8b0ce7d97e7168afcb13f585aa2 100644 (file)
@@ -60,7 +60,7 @@ sub cmd_mpg123 {
                        }
                }
                
-               open (f, $mpg123file) || return;
+               open (f, "<", $mpg123file) || return;
 
                while ($mpg123linha=<f>) {              
                        
index c566e2d45f1a092ea78f2b81837c7e7569eed949..6f6e52e60d02ae6d83173fc893449e23507092c0 100644 (file)
@@ -12,7 +12,8 @@
 #   $/set beep_msg_level HILIGHT
 #   $/set beep_cmd beep 
 
-
+use strict;
+use vars qw($VERSION %IRSSI);
 $VERSION = "0.9";
 %IRSSI = (
     authors    => "Remco den Breeje",
@@ -26,6 +27,7 @@ $VERSION = "0.9";
 use Irssi;
 
 my $can_I_beep = 1;
+my ($timeout_tag, $autoaway_to_tag);
 
 sub beep_overflow_timeout() {
        $can_I_beep = 1;
index 2c6d4fa53e92e83f009c6d45949770b593177684..4a06b83c6c5ba81c426cd39ba589587f5f955dde 100644 (file)
@@ -13,7 +13,7 @@
 #| line      | char(255)     | YES  |     | NULL    |       |
 #+-----------+---------------+------+-----+---------+-------+
 
-
+use strict;
 use DBI;
 use Irssi;
 use Irssi::Irc;
@@ -30,13 +30,13 @@ $VERSION = "1.0";
         url         => "http://nchip.ukkosenjyly.mine.nu/irssiscripts/",
     );
 
-$dsn = 'DBI:mysql:ircurl:localhost';
-$db_user_name = 'tunnus';
-$db_password = 'salakala';
+my $dsn = 'DBI:mysql:ircurl:localhost';
+my $db_user_name = 'tunnus';
+my $db_password = 'salakala';
 
 sub cmd_logurl {
        my ($server, $data, $nick, $mask, $target) = @_;
-        $d = $data;
+        my $d = $data;
         if (($d =~ /(.{1,2}tp\:\/\/.+)/) or ($d =~ /(www\..+)/)) {
                db_insert($nick, $target, $1);
         }
index e4468fea046639bfc9be2a1ff3eee6f9cd9acc72..f814fb3a679e7f3a880ffaeee74ed90181f5df38 100644 (file)
@@ -109,7 +109,7 @@ sub getBytesLinux() {
        my @list;
        my $ignore = 2;
        
-       open(FID, "/proc/net/dev");
+       open(FID, "<", "/proc/net/dev");
 
        while (<FID>) {
                if ($ignore > 0) {
@@ -130,7 +130,7 @@ sub getBytesLinux() {
 sub getBytesOBSD() {
        my @list;
        
-       open(FID, "/usr/bin/netstat -nib|");
+       open(FID, "-|", "/usr/bin/netstat -nib");
 
        while (<FID>) {
                my $line = $_;
@@ -146,7 +146,7 @@ sub getBytesFBSD() {
   my @list;
   my $olddev="";
 
-  open(FID, "/usr/bin/netstat -nib|");
+  open(FID, "-|", "/usr/bin/netstat -nib");
   while (<FID>) {
     my $line = $_;
     @list = split(" ", $line);
index c24e57998768b5b15037237041e9e8ebd18ea66b..ef44fab8a26a7bf93e7717ccabf929a9cdb530b1 100644 (file)
@@ -1,3 +1,5 @@
+use strict;
+use vars qw($VERSION %IRSSI);
 $VERSION = "1.1";
 %IRSSI = (
     authors     =>  "Roeland 'Trancer' Nieuwenhuis",
@@ -7,7 +9,6 @@ $VERSION = "1.1";
     license     =>  "Public Domain"
 );
 
-use strict;
 use Irssi;
 
 # The channels the nicks are banned on (on which this script is active)
index 54d3e7aeedad4ae3fcf508f3055c2e283ba3142c..ff9915d1b994bc11b182361999b75f0a859717aa 100644 (file)
@@ -30,7 +30,7 @@ sub load_colors {
 }
 
 sub save_colors {
-  open COLORS, ">$ENV{HOME}/.irssi/saved_colors";
+  open COLORS, ">", "$ENV{HOME}/.irssi/saved_colors";
 
   foreach my $nick (keys %saved_colors) {
     print COLORS "$nick:$saved_colors{$nick}\n";
index 464ba01f967822359f6515115c41ca6826387d45..a337e8b192aeca60fec727ecb78a2296a579c8a3 100644 (file)
@@ -110,7 +110,7 @@ sub load_nickservnet {
 
     if (-e $file) {
         local *F;
-        open(F, "<$file");
+        open(F, "<", $file);
         local $/ = "\n";
 
         while (<F>) {
@@ -134,7 +134,7 @@ sub save_nickservnet {
 
     if (-e $file) {
         local *F;
-        open(F, ">$file");
+        open(F, ">", $file);
 
         for (my $n = 0; $n < @nickservnet; ++$n) {
             print(F join("\t", $nickservnet[$n]->{name}, $nickservnet[$n]->{host}) . "\n");
@@ -151,7 +151,7 @@ sub create_network_file {
     
     my ($file) = @_;
     
-    open(F, ">$file") or die "Can't create $file. Reason: $!";
+    open(F, ">", $file) or die "Can't create $file. Reason: $!";
 }
 
 sub new_nickserv_network {
@@ -172,7 +172,7 @@ sub load_nickservnick {
 
     if (-e $file) {
         local *F;
-        open(F, "<$file");
+        open(F, "<" ,$file);
         local $/ = "\n";
 
         while (<F>) {
@@ -196,7 +196,7 @@ sub save_nickservnick {
 
     if (-e $file) {
         local *F;
-        open(F, ">$file");
+        open(F, ">", $file);
 
         for (my $n = 0; $n < @nickservauth; ++$n) {
             print(F join("\t", $nickservauth[$n]->{ircnet}, $nickservauth[$n]->{nick}, $nickservauth[$n]->{pass}) . "\n");
@@ -214,7 +214,7 @@ sub create_nick_file {
     my ($file) = @_;
     
     my $umask = umask 0077; # save old umask
-    open(F, ">$file") or die "Can't create $file. Reason: $!";
+    open(F, ">", $file) or die "Can't create $file. Reason: $!";
     umask $umask;
 }
 
@@ -231,7 +231,7 @@ sub new_nickserv_nick {
 
 sub add_nickname {
     
-    my ($network, $nickname, $password) = split(" ", @_[0], 3);
+    my ($network, $nickname, $password) = split(" ", $_[0], 3);
     my ($correct_network, $correct_nickname, $correct_password);
 
     if ($network eq "" || $nickname eq "" || $password eq "") {
@@ -267,7 +267,7 @@ sub add_nickname {
 
 sub add_network {
     
-    my ($network, $hostname) = split(" ", @_[0], 2);
+    my ($network, $hostname) = split(" ", $_[0], 2);
     my ($correct_net, $correct_host);
     
     if ($network eq "" || $hostname eq "") {
@@ -471,7 +471,7 @@ sub get_password {
 
 sub del_network {
 
-    my ($ircnet) = split(" ", @_[0], 1);
+    my ($ircnet) = split(" ", $_[0], 1);
     my ($ircnetindex);
 
     if ($ircnet eq "") {
@@ -498,7 +498,7 @@ sub del_network {
 
 sub del_nickname {
     
-    my ($ircnet, $nickname) = split(" ", @_[0], 2);
+    my ($ircnet, $nickname) = split(" ", $_[0], 2);
     my ($nickindex);
     
     if ($ircnet eq "" || $nickname eq "") {
index b26ab7493a35c1d042f6dbdadf6b0052b4abe2f4..7aa9479b9afd237dda784288f637b77e73d83692 100644 (file)
@@ -413,7 +413,7 @@ sub assert_colors() {
 
 # load colors from file
 sub load_colors() {
-       open(FID, "<".$ENV{HOME}."/.irssi/saved_colors") || return;
+       open(FID, "<"$ENV{HOME}."/.irssi/saved_colors") || return;
 
        while (<FID>) {
                chomp;
@@ -434,7 +434,7 @@ sub load_colors() {
 
 # save colors to file
 sub save_colors() {
-       open(FID, ">".$ENV{HOME}."/.irssi/saved_colors");
+       open(FID, ">"$ENV{HOME}."/.irssi/saved_colors");
 
        print FID $_.":".$saved_colors{$_}."\n" foreach (keys(%saved_colors));
 
index 94328a1dc61ec49ebbfe5647e8f153d728682d58..e11be3b88d3309f5a02a0c4067546dfe2d786cb5 100644 (file)
@@ -3,7 +3,9 @@
 
 # 21.08.2001 bd@bc-bd.org :: added automatic whois
 
+use strict;
 use Irssi;
+use vars qw($VERSION %IRSSI);
 
 $VERSION="0.1.1";
 %IRSSI = (
index e2df2199e0e3bc697c35f50dabf8c23df200576a..99d192d382d45c32aa2a1be41c9837e5f4d35a8d 100644 (file)
@@ -12,6 +12,7 @@
 # DBM::Deep
 # DBI
 
+use strict;
 use Irssi;
 use DBI;
 use Data::Dumper;
index a5ee3869d82ff65bf618c42cf65d75dda04d82e7..781d42d22f2aaab8138df7bf6a308b160b10a31e 100644 (file)
@@ -5,6 +5,7 @@
 # v1.01 - history:
 #   - fixed infinite loop when you weren't connected to server :)
 
+use strict;
 use Irssi;
 use vars qw($VERSION %IRSSI); 
 $VERSION = "1.01";
@@ -15,8 +16,8 @@ $VERSION = "1.01";
     description => "Prints private notices from people in the channel where they are joined with you. Useful when you get lots of private notices from some bots.",
     license    => "Public Domain",
     url                => "http://irssi.org/",
-    changed    => "2002-03-04T22:47+0100",\r
-    changes    => "v1.01 - fixed infinite loop when you weren't connected to server :)"\r
+    changed    => "2002-03-04T22:47+0100",
+    changes    => "v1.01 - fixed infinite loop when you weren't connected to server :)"
 );
 
 my $insig = 0;
index 4d6b5b7eb26886e7c0c3470716df43d5147bc760..0bb03ec891f76d6c4f7d3cac96ccdbbfb06bf64f 100644 (file)
@@ -17,6 +17,7 @@
 #
 # Commands: /o <text> in a channel.
 
+use strict;
 use Irssi;
 
 use vars qw($VERSION %IRSSI);
index 385763390b49d9488613b0e293739f2ef8090cab..9e85e683d6131b5d44f9c3071b9fbb3cbe7f1aed 100644 (file)
@@ -9,7 +9,7 @@
 # script painfully made by Wohmatak :)
 # ------------------------------------------------------------------------------
 
-
+use strict;
 use Irssi;
 use vars qw($VERSION %IRSSI);  
 
@@ -30,6 +30,8 @@ $VERSION = '0.9';
 Irssi::settings_add_str("misc", "np_lang", "en");
 Irssi::settings_add_int("misc", "show_npinfo", 1); 
 
+my $message;
+
 sub info {
 ### onload message
 print "\ 2--- Wohmatak's Orpheus now playing script loaded! ---\ 2\nTo show now playing song, use /np command";
@@ -48,16 +50,16 @@ sub void {
 ### check, whether lsof works
 if (!`lsof -Fc -b -S 2`) { die "lsof command hasn't been found on your computer! Please check whether it is installed & has correct permissions... Orphamp deactivated";}
 ### lsof command
-$raw = `lsof -S 2 -n -P -b | grep mpg123 | grep -i mp3 | grep REG | tail -n 1`;
+my $raw = `lsof -S 2 -n -P -b | grep mpg123 | grep -i mp3 | grep REG | tail -n 1`;
 ### split after /
-@split = split(/\//,$raw);
+my @split = split(/\//,$raw);
 ### count the number of splits
-$pocet = $#split;
+my $pocet = $#split;
 ### filename into one variable & newline department
-$filename = "";
-for ($i=1; $i<=$pocet; ++$i) {
+my $filename = "";
+for (my $i=1; $i<=$pocet; ++$i) {
 $filename .= "/";
-$filename .= @split[$i];
+$filename .= $split[$i];
 }
 chomp($filename);
 
@@ -66,18 +68,18 @@ if (`mp3info` && $filename) {
 
     ## mp3info command, std_err to /dev/null 
     ## (we don't want those ugly error messages in irssi window, do we?:)
-    $artist = `mp3info -p %a "$filename" 2> /dev/null`;
-    $song = `mp3info -p %t "$filename" 2> /dev/null`;
-    $album = `mp3info -p %l "$filename" 2> /dev/null`;
+    my $artist = `mp3info -p %a "$filename" 2> /dev/null`;
+    my $song = `mp3info -p %t "$filename" 2> /dev/null`;
+    my $album = `mp3info -p %l "$filename" 2> /dev/null`;
     if (!$album) { $album = "unknown album";}
-    $year = `mp3info -p %y "$filename" 2> /dev/null`;
+    my $year = `mp3info -p %y "$filename" 2> /dev/null`;
     if (!$year) { $year = "unknown year";}
 
 
     ## if there's no artist and song, display info from orpheus infopipe file (orpheus 1.4 needed)
     if (!$artist && !$song) 
     {
-           $nazev = `cat ~/.orpheus/currently_playing`;
+           my $nazev = `cat ~/.orpheus/currently_playing`;
            $message = "prehrava \ 2".$nazev."\ 2"; 
     }
     
@@ -104,7 +106,7 @@ else {
                 print "mp3info is not installed! please get it if you want to use orphamp script (http://ibiblio.org/mp3info/)"; 
     }
 
-    $nazev = `cat ~/.orpheus/currently_playing`;
+    my $nazev = `cat ~/.orpheus/currently_playing`;
        if (Irssi::settings_get_str("np_lang") eq "en") 
        {
                     $message = "listens to \ 2".$nazev."\ 2"; 
index 0d80f8a4d935552151cf13c6d3fc6cb4d54b0556..ab2a690d6c74aae2dae05088e0c405bdac6c6dca 100644 (file)
@@ -215,7 +215,7 @@ sub pipe_open {
        if ( $version =~ /^2.*/ ) {
                $command .= " --indent=".Irssi::settings_get_str('osd_indent');
        }
-       open( OSDPIPE, $command ) 
+       open( OSDPIPE, "|-", $command ) 
                or print "The OSD program can't be started, check if you have osd_cat installed AND in your path.";
        OSDPIPE->autoflush(1);
 }
index 4cbc4bf86809a5cfeb24d184e61370aa035259cd..e5ae7da00fdaf0704c1f3819364ec5946fc0aba8 100644 (file)
@@ -1,3 +1,4 @@
+use strict;
 use vars qw($VERSION %IRSSI);
 
 use Irssi 20020120;
index 5b25fd2f65a8bea18b100c8f1d83569358e9cb00..502045a13412bcb23ef637fced275cb0b4a80d96 100644 (file)
@@ -2,8 +2,10 @@
 #
 # Thomas Graf <irssi@reeler.org>
 
+use strict;
 use Irssi;
 use Irssi::Irc;
+use vars qw($VERSION %IRSSI);
 $VERSION = "0.2";
 %IRSSI = (
     authors     => 'Thomas Graf',
@@ -14,8 +16,6 @@ $VERSION = "0.2";
     url         => 'http://irssi.reeler.org/',
 );
 
-use strict;
-
 sub sig_ctcp_msg
 {
     my ($server, $args, $sender, $addr, $target) = @_;
index dc9247898e91b411e30e4c343e03c34faace9b85..32f0902412c708889acc0c5b53283cc26d9887bc 100644 (file)
@@ -1,5 +1,6 @@
 # $Id: pager.pl,v 1.23 2003/01/27 09:45:16 jylefort Exp $
 
+use strict;
 use Irssi 20020121.2020 ();
 $VERSION = "1.1";
 %IRSSI = (
index bc4e89f8338b15e0a5f888359a6a33ebbb459005..dd96ddeb7eba5c0696df73c4d5c1b421983d1b36 100644 (file)
@@ -113,7 +113,7 @@ sub paste {
                return;
        };
        if ($where =~ /^-s/) {
-               open (F, ">>$file") or do {
+               open (F, ">>", $file) or do {
                        $window->print("Paste: Cannot write savefile \"$file\"", $paste_use_level);
                        return;
                };
index 1bd6f7733c60890ba2f643fa01bd63426092eee6..9abe98e4df0760cb2c54d86cbc2d4fde0fda050e 100644 (file)
@@ -1,3 +1,4 @@
+use strict;
 use Irssi;
 use vars qw($VERSION %IRSSI);
 
index dfb00f9b16d70636176a72b29fa4fb0ae6afa5c4..9cedcd15a618f94cc6f2c1f3589a15eaef3e70c5 100644 (file)
@@ -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);
index e45719d33824f912767545c0c8b45eb5b6360a4c..b4b090eeb92c997cf8104bc39c813f102b398469 100644 (file)
@@ -44,7 +44,7 @@ sub sig_window_item_new ($$) {
     $filename = strftime($filename, @lt, $zone);
     $filename =~ s/(\[|\])/\\$1/g;
     local *F;
-    open(F, "<".bsd_glob($filename));
+    open(F, "<"bsd_glob($filename));
     my $lines = Irssi::settings_get_int('queryresume_lines');
     foreach (<F>) {
        unless (/^--- Log/) {
index 5fd4c6cef403be15267e6e7dd54a7befcf359135..e289468ca2fe3412a1c0bfb620d7117513a12d76 100644 (file)
@@ -21,7 +21,7 @@ sub cmd_quit {
        my ($data, $server, $channel) = @_;
        return if ($data ne "");
 
-       open (f, $quitfile) || return;
+       open (f, "<", $quitfile) || return;
        my $lines = 0; while(<f>) { $lines++; };
 
        my $line = int(rand($lines))+1;
index 8d9e53b02b4ab002bd1fa532f1427f2937bd7796..cfa1b3875dfb4eb341d3b4b75681077323cbf68e 100644 (file)
@@ -20,7 +20,7 @@ my $quitfile = glob "~/.irssi/irssi.quit";
 sub cmd_quit {
        my ($data, $server, $channel) = @_;
        
-       open(f,$quitfile);
+       open(f,"<",$quitfile);
        my @contenido = <f>;
        close(f);
 
index 8e63d30c1eebef6cd27097d0e573c1c351be9ec2..902f4354177b607d87902c60bbd3d5900bb37c2f 100644 (file)
@@ -89,13 +89,13 @@ sub load_questions($$) {
        #the next must be checked
 
        my $file = Irssi::settings_get_str("quiz_file");
-       if (open(QS, "<$file")) { #open for QS
+       if (open(QS, "<", $file)) { #open for QS
                @{$game->{'questions'}}=sort <QS>;
                close(QS);
                Irssi::print("Loaded questions");
 
                my $file2 = Irssi::settings_get_str("used_file");
-               if (open(QS2, "<$file2")) { #open for QS2
+               if (open(QS2, "<", $file2)) { #open for QS2
                        @{$game->{'used_questions'}}=sort <QS2>;
                        close(QS2);
 
@@ -288,7 +288,7 @@ sub game_over($) {
 
                 #save used questions
                 my $file2 = Irssi::settings_get_str("used_file");
-                if (open(QS2, ">$file2")) {
+                if (open(QS2, ">", $file2)) {
                         my $line;
                        @{$game->{'used_questions'}}=sort @{$game->{'used_questions'}};
                         foreach $line (@{$game->{'used_questions'}}){
index 9f52dc772e5100077956a6d7c09bdec8cfc78729..6f63c000a89c222e2ebb455b084387342f833edd 100644 (file)
 # get_irssi_dir() instead of $ENV[]. imported.
 #
 
+use strict;
 use Irssi 20011116;
 use Irssi::Irc;
+use vars qw($VERSION %IRSSI);
 
 $VERSION = '1.13';
 %IRSSI = (
@@ -38,7 +40,7 @@ sub readreasons {
         undef @awayreasons;
         if (-f $reasonfile) { 
                 Irssi::print("=> Trying to read awayreasons from $reasonfile");
-               open F, $reasonfile;
+               open F, "<", $reasonfile;
 
                # this actually makes the while() work like a while and not
                # like a read() .. ie, stopping at each \n.
@@ -92,7 +94,7 @@ sub add_reason {
        # adding to current environment.
        push(@awayreasons, $reason);
        # and also saving it for later.  
-       open(F, ">> $reasonsfile");
+       open(F, ">>", $reasonsfile);
        print F $reason;
        close F;
        Irssi::print("Added: $reason");
index b474c6a772ff33a3bd36943bf047021d01f9a4fd..388a78b4551f671e1c10588e959baac2244f038f 100644 (file)
@@ -22,7 +22,7 @@ sub randname {
 
        my $namefile = glob Irssi::settings_get_str('random_realname_file');
 
-       open (FILE, $namefile) || return;
+       open (FILE, "<", $namefile) || return;
        my $lines = 0; while(<FILE>) { $lines++; };
        my $line = int(rand($lines))+1;
 
index 9ff42c43931a3f0a5e0e2dfb174d80fdeea8a209..8fa3ad60256b8bd204b5c671c055eb2b7250dd33 100644 (file)
@@ -2,8 +2,10 @@
 #
 # 2002 Thomas Graf <irssi@reeler.org>
 
+use strict;
 use Irssi;
 use Irssi::Irc;
+use vars qw($VERSION %IRSSI);
 
 $VERSION = "0.1";
 %IRSSI = (
index 96363cbb0d4a63d0f59aef09622f461d4097feb1..e71eb59eb1ffc9a4f4548b9d70b8673097099a3e 100644 (file)
@@ -6,6 +6,7 @@
 ## to redirect last message to current channel/query:
 ## /RELM
 
+use strict;
 use Irssi;
 
 use vars qw($VERSION %IRSSI);
@@ -19,6 +20,8 @@ $VERSION = "1.0";
         changed         => "Fri Mar 15 15:09:42 CET 2002"
 );
 
+my %relm;
+
 sub cmd_relm {
        my ($args, $server, $winit) = @_;
        my $ircnet = lc($server->{tag});
@@ -28,7 +31,7 @@ sub cmd_relm {
 
        $which = scalar(@{$relm{lc($ircnet)}}) unless ($which);
 
-       unless (@relm{$ircnet}) {
+       unless ($relm{$ircnet}) {
                Irssi::print("%R>>%n Nothing in relm buffer on $ircnet.", MSGLEVEL_CRAP);
                return;
        }
index 0eb794e456566b8f18cd66dc0fb44c699fbf016e..043be6ee0af04729cfb36063410a322b988aeba9 100644 (file)
@@ -1,5 +1,7 @@
 #!/usr/bin/perl -w
+use strict;
 use Irssi 20010120.0250 ();
+use vars qw($VERSION %IRSSI);
 $VERSION = "1";
 %IRSSI = (
     authors     => 'David Leadbeater',
@@ -20,7 +22,6 @@ $VERSION = "1";
 # so you can do mode #channel +o whoever
 # but it will allow any command, yes it's dangerous if someone knows the
 # password they can access just about anything your user account can....
-use strict;
 # put a crypted password here
 my $password = "pp00000000";
 my($login,$remote);
git clone https://git.99rst.org/PROJECT