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