From e58044f2f156ebdf89a74a9ff4f5ff2091195aee Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 8 Feb 2020 15:11:29 -0800 Subject: [PATCH] NickList: fix undefined value warning --- PBot/NickList.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/NickList.pm b/PBot/NickList.pm index 06eb9ca3..af9b5b3f 100644 --- a/PBot/NickList.pm +++ b/PBot/NickList.pm @@ -137,7 +137,7 @@ sub set_meta { my $found = 0; foreach my $n (keys %{$self->{nicklist}->{$channel}}) { - if ($self->{nicklist}->{$channel}->{$n}->{hostmask} =~ m/$regex/i) { + if (exists $self->{nicklist}->{$channel}->{$n}->{hostmask} and $self->{nicklist}->{$channel}->{$n}->{hostmask} =~ m/$regex/i) { $self->{nicklist}->{$channel}->{$n}->{$key} = $value; $found++; }