From 6ad5ab8474f188c453b3dbeb91ccd427a6419fb7 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Tue, 26 Apr 2016 17:27:32 -0700 Subject: mass_hilight_blocker: fix nick quoting --- scripts/mass_hilight_blocker.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/mass_hilight_blocker.pl b/scripts/mass_hilight_blocker.pl index a5611a3..99e22fd 100644 --- a/scripts/mass_hilight_blocker.pl +++ b/scripts/mass_hilight_blocker.pl @@ -18,14 +18,14 @@ use strict; use Irssi; use vars qw($VERSION %IRSSI); -$VERSION = "0.2"; +$VERSION = "0.3"; %IRSSI = ( authors => "Uli Baumann", contact => "f-zappa\@irc-muenster.de", name => "mass_hilight_blocker", description => "Disables hilighting for messages containing a lot of nicknames", license => "GPL", - changed => "Tue Jun 1 13:32:20 CEST 2004", + changed => "Wed Apr 27 02:30:00 CEST 2016", ); @@ -43,8 +43,7 @@ sub sig_printtext { foreach my $nick ($channel->nicks()) # walk through nicks { $nick = $nick->{nick}; - $nick =~ s/([\]\[])/\\$1/g; # ']' and '[' need masking - if ($text =~ /$nick/) # does line contain this nick? + if ($text =~ /\Q$nick/) # does line contain this nick? {$num_nicks++;} # then increase counter } -- cgit v1.2.3 From 4290276950b399105bde8dd6b8ca1843c1cd4adb Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Tue, 26 Apr 2016 17:34:00 -0700 Subject: autoaway: remove dead code --- scripts/autoaway.pl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/autoaway.pl b/scripts/autoaway.pl index be6cbf7..ef3c485 100644 --- a/scripts/autoaway.pl +++ b/scripts/autoaway.pl @@ -23,7 +23,7 @@ use Irssi; use Irssi::Irc; use vars qw($VERSION %IRSSI); -$VERSION = "0.3"; +$VERSION = "0.4"; %IRSSI = ( authors => 'Larry "Vizzie" Daffner', contact => 'vizzie@airmail.net', @@ -31,7 +31,7 @@ $VERSION = "0.3"; description => 'Automatically goes away after defined inactivity', license => 'BSD', url => 'http://www.flamingpackets.net/~vizzie/irssi/', - changed => 'Tue Oct 19 14:41:15 CDT 2010', + changed => 'Tue Apr 26 19:30:00 CDT 2016', changes => 'Applied multiserver/store config patch from Adam Monsen' ); @@ -76,16 +76,6 @@ sub cmd_away { if ($data eq "") { $autoaway_state = 0; - # If $autoaway_state is 2, we went away by typing /away, and need - # to restart autoaway ourselves. Otherwise, we were autoaway, and - # we'll let the autoaway return take care of business. - - if ($autoaway_state eq 2) { - if ($autoaway_sec) { - $autoaway_to_tag = - Irssi::timeout_add($autoaway_sec*1000, "auto_timeout", ""); - } - } } else { if ($autoaway_state eq 0) { Irssi::timeout_remove($autoaway_to_tag); -- cgit v1.2.3 From 36ec0681fd9c30b625b46e2e31f0015156c29e1d Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Tue, 26 Apr 2016 18:00:41 -0700 Subject: recentdepart: fix undefined variable warnings --- scripts/recentdepart.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/recentdepart.pl b/scripts/recentdepart.pl index f0cc121..efb8b95 100644 --- a/scripts/recentdepart.pl +++ b/scripts/recentdepart.pl @@ -56,7 +56,7 @@ use warnings; use Irssi; use Irssi::Irc; -our $VERSION = "0.6"; +our $VERSION = "0.7"; our %IRSSI = ( authors => 'Matthew Sytsma', contact => 'spiderpigy@yahoo.com', @@ -204,7 +204,7 @@ sub on_part } elsif (check_channel($server, $channel)) { - if (time() - $nickhash{$server->{'tag'}}{lc($nick)}{$channel} > Irssi::settings_get_int("recdep_period")) + if (!defined $nickhash{$server->{'tag'}}{lc($nick)}{$channel} || time() - $nickhash{$server->{'tag'}}{lc($nick)}{$channel} > Irssi::settings_get_int("recdep_period")) { $use_hide ? $Irssi::scripts::hideshow::hide_next = 1 : Irssi::signal_stop(); @@ -251,7 +251,7 @@ sub on_join if (check_channel($server, $channel)) { - if (time() - $joinwatch{$server->{'tag'}}{$channel}{lc($nick)} > Irssi::settings_get_int("recdep_rejoin")) + if (!defined $joinwatch{$server->{'tag'}}{$channel}{lc($nick)} || time() - $joinwatch{$server->{'tag'}}{$channel}{lc($nick)} > Irssi::settings_get_int("recdep_rejoin")) { $use_hide ? $Irssi::scripts::hideshow::hide_next = 1 : Irssi::signal_stop(); -- cgit v1.2.3