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;
# $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',
#
# 2002-01-24 initial release
-use strict;
-
sub beep {
my $server = Irssi::active_server;
if ($server && ! $server->{usermode_away}
# 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",
use Irssi;
-my $might_beep = 1, $to_tag;
+my $might_beep = 1;
+my $to_tag;
sub beep_overflow_timeout() {
$might_beep = 1;
# /statusbar window add join_notice
# use Data::Dumper;
-#use strict;
+use strict;
use Irssi::TextUI;
#use Irssi::Themes;
use Data::Dumper;
{
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";
sub loadkeys
{
if ( -e "$kfile" ) {
- open (KEYF, "<$kfile");
+ open (KEYF, q{<}, $kfile);
@keys = <KEYF>;
close (KEYF);
}
# 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\:/) {
my $serv;
my $chan;
- open (KEYF, ">$kfile");
+ open (KEYF, q{>}, $kfile);
foreach(@keys) {
s/\n//g;
($serv,$chan)=/^(.*?)\:(.*?)\:/;
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;
}
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];
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};
}
}
# $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",
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/,$//;
}
my ($icqfriends, $msnfriends) = (0, 0);
- while ($filename = readdir(ICQDIR)) {
+ while (my $filename = readdir(ICQDIR)) {
# ICQ friends
if ($filename =~ /^[0-9]+$/ && $filename !~ /^0$/) {
$icqfriends++;
$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}.");
}
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);
}
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);
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);
#
################################################################################
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
use integer;
# Supports for limiting searches only to specified ircnets and
# channels. Some cleanups..
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$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",\r
+ 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.."
);
+use strict;
+use vars qw($VERSION %IRSSI);
use Irssi 20010920.0000 ();
$VERSION = "2.01";
%IRSSI = (
url => 'http://irssi.dgl.cx/',
);
-use strict;
-
sub cmd_clones {
my ($data, $server, $channel) = @_;
# colorkick_blink int 0: don't kick on blink
#
-
+use strict;
use Irssi;
use Irssi::Irc;
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";
}
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";
}
sub cmd_jobssave {
- if (not open (FILE, "> $savefile")) {
+ if (not open (FILE, ">", $savefile)) {
Irssi::print("Could not open file '$savefile': $!");
return;
}
}
sub cmd_jobsload {
- if (not open (FILE, "$savefile")) {
+ if (not open (FILE, q{<}, $savefile)) {
Irssi::print("Could not open file '$savefile': $!");
return;
}
#
##########
+use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.5';
# Copyright (C) 2003 by Peder Stray <peder@ninja.no>
#
+use strict;
use Irssi;
use vars qw{$VERSION %IRSSI};
($VERSION) = '$Revision: 1.4 $' =~ / (\d+\.\d+) /;
+use strict;
use Irssi::Irc;
use Irssi 20020217; # Irssi 0.8.0
use vars qw($VERSION %IRSSI);
##
########################################################################################################
+use strict;
+
BEGIN { $ENV{HARNESS_ACTIVE} = 1 }
use IO::Handle;
my @list;
my $skip_line_one = 1;
- open(FID, "/bin/df -h|");
+ open(FID, "-|", "/bin/df");
while (<FID>)
{
if ($skip_line_one > 0)
my $old = '';
my $start = 0;
my $pointer = 0;
- open(DICT, $file) or die $!;
+ open(DICT, q{<}, $file) or die $!;
while (<DICT>) {
chomp;
push @array, $_;
@doc = ();
Irssi::print("Loading doc from $doc_file");
local *DOC;
- open(DOC,"$doc_file");
+ open(DOC, q{<}, $doc_file);
local $/ = "\n";
while (<DOC>) {
chop();
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";