3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-27 06:19:25 +01:00

Fix undefined variable warning in find_factoid

This commit is contained in:
Pragmatic Software 2015-10-19 12:21:42 -07:00
parent 81abdbec29
commit 89eda8f0a9

View File

@ -269,7 +269,7 @@ sub find_factoid {
# check factoids # check factoids
foreach my $channel (sort keys %{ $self->{factoids}->hash }) { foreach my $channel (sort keys %{ $self->{factoids}->hash }) {
if($exact_channel) { if($exact_channel) {
if($exact_trigger == 1) { if(defined $exact_trigger && $exact_trigger == 1) {
next unless $from eq lc $channel; next unless $from eq lc $channel;
} else { } else {
next unless $from eq lc $channel or $channel eq '.*'; next unless $from eq lc $channel or $channel eq '.*';