3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

NickList: fix undefined value warning

This commit is contained in:
Pragmatic Software 2020-02-08 15:11:29 -08:00
parent f698840bd0
commit e58044f2f1

View File

@ -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++;
}