Branch Coverage

blib/lib/POE/Component/IRC/Plugin/MegaHAL.pm
Criterion Covered Total %
branch 7 66 10.6


line true false branch
23 0 1 if (ref $$self{'MegaHAL'} eq 'POE::Component::AI::MegaHAL') { }
28 1 0 $$self{'MegaHAL_args'} ? :
32 1 0 unless defined $$self{'Method'} and $$self{'Method'} =~ /privmsg|notice/
34 1 0 unless defined $$self{'Abuse_interval'}
42 0 1 unless ($irc->isa('POE::Component::IRC::State'))
69 0 1 if $$self{'Own_channel'}
109 0 0 if ($reply =~ s/^\x01 //) { }
123 0 0 if ($reply =~ s/^\x01 //) { }
136 1 0 unless ($$self{'keep_alive'})
147 0 0 if $$self{'Own_channel'} and $self->_is_own_channel($chan)
149 0 0 if ($$self{'Channels'})
152 0 0 if is_utf8 $_
154 0 0 unless first sub { my $c = $chan; $c = decode_irc($c) if is_utf8 $_; $_ eq $c; } , @{$$self{'Channels'};}
162 0 0 if ($$self{'Ignore_masks'})
164 0 0 if keys %{matches_mask_array($$self{'Ignore_masks'}, [$user], $mapping);}
178 0 0 if $last_time and time - $last_time < $$self{'Abuse_interval'}
186 0 0 if $self->_ignoring_channel($chan)
187 0 0 if $self->_ignoring_user($user)
192 0 0 if ($$self{'Own_channel'} and $self->_is_own_channel($chan) or $type eq 'public' and $what =~ s/^\s*\Q$nick\E[:,;.!?~]?\s//i or $$self{'Talkative'} and $what =~ /\Q$nick\E/i)
199 0 0 if ($event eq '_megahal_reply' and $self->_ignoring_abuser($user, $chan))
203 0 0 if ($$self{'Ignore_regexes'})
205 0 0 if $what =~ /$regex/
223 0 0 if is_utf8 $own
224 0 0 if $chan eq $own
231 0 0 if $self->_ignoring_user($user, $chan)
232 0 0 unless $$self{'Own_channel'} and $self->_is_own_channel($chan)
247 0 0 if ($$self{'English'})
271 0 0 if (ref $brain ne 'POE::Component::AI::MegaHAL')
276 0 0 unless $$self{'keep_alive'}
284 0 0 if $$self{'Own_channel'}
293 0 0 unless $irc->isupport('CHANTYPES')
295 0 0 unless $chan =~ /^[$chantypes]/
324 0 0 if (split(/!/, $user, 0))[0] eq $irc->nick_name