summaryrefslogtreecommitdiffstats
path: root/scripts/recentdepart.pl
diff options
context:
space:
mode:
authorTrevor Slocum2016-04-26 18:00:41 -0700
committerTrevor Slocum2016-04-26 18:09:03 -0700
commit36ec0681fd9c30b625b46e2e31f0015156c29e1d (patch)
treee40f4f04dd4ca58917fa632c519796e80f105071 /scripts/recentdepart.pl
parent4290276950b399105bde8dd6b8ca1843c1cd4adb (diff)
downloadscripts.irssi.org-36ec0681fd9c30b625b46e2e31f0015156c29e1d.tar.bz2
recentdepart: fix undefined variable warnings
Diffstat (limited to 'scripts/recentdepart.pl')
-rw-r--r--scripts/recentdepart.pl6
1 files changed, 3 insertions, 3 deletions
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();