Branch Coverage

blib/lib/Net/Vypress/Chat.pm
Criterion Covered Total %
branch 141 256 55.0


line true false branch
26 0 153 if $$self{'debug'}
27 0 153 if ($buffer and $$self{'debug'} == 2)
84 0 0 if ($$self{'channels'}{$chan}{'topic'})
100 2 0 if (@{$$channel{'users'};}[$_] eq $from)
104 2 0 if $last
112 2 0 if ($nick eq $$self{'nick'}) { }
119 0 0 if (@{$$self{'channels'}{$chan}{'users'};}[$_] eq $nick)
123 0 0 if $last
141 1 0 if (@{$$self{'users'}{$$self{'nick'}}{'chats'};}[$_] eq $nick)
145 1 0 if $last
182 20 1 if (defined $$self{'users'}{$to}{'ip'}) { }
1 0 elsif ($$self{'uc_fail'} == 1) { }
365 0 1 defined $args{'uc_fail'} ? :
366 0 1 defined $args{'coll_avoid'} ? :
367 1 0 defined $args{'send_info'} ? :
368 0 1 defined $args{'sign_topic'} ? :
372 0 1 if (not defined $args{'localip'} and $$self{'localip'} eq '127.0.0.1')
427 0 0 if (not $$self{'port'} eq $port && $$self{'localip'} eq $localip) { }
450 0 1 if ($self->on_userlist($nick)) { }
1 0 elsif ($$self{'nick'} ne $nick) { }
458 0 1 length $nick > 20 ? :
468 1 0 if (defined $$self{'send'} and $$self{'init'}) { }
495 10 9 if ($status == 0) { }
3 6 elsif ($status == 1) { }
3 3 elsif ($status == 2) { }
3 0 elsif ($status == 3) { }
527 9 3 if ($status == 0) { }
2 1 elsif ($status == 1) { }
647 2 0 if (not $self->on_chan($$self{'nick'}, $chan)) { }
676 2 0 if ($self->on_chan($$self{'nick'}, $chan)) { }
700 1 0 if $topic and $$self{'sign_topic'}
734 0 0 if (not $_ eq $$self{'nick'}) { }
781 0 4 unless $$self{'users'}{$$self{'nick'}}{'autoanswer'}
784 4 0 if ($$self{'send'})
913 1 1 unless $host
914 1 1 unless $ip
915 1 1 unless $user
916 1 1 unless $aa
918 1 1 if (not defined $chans or $chans eq '1') { }
0 1 elsif ($chans eq '0') { }
948 2 0 if (not $self->on_priv($to)) { }
970 1 0 if ($self->on_priv($to)) { }
992 1 0 unless $text
993 1 0 if ($self->on_priv($to)) { }
1014 1 0 unless $text
1015 1 0 if ($self->on_priv($to)) { }
1118 6 8 unless (defined $chan)
1122 10 4 if (defined $$self{'channels'}{$chan} and grep /^\Q$nick\E$/, @{$$self{'channels'}{$chan}{'users'};}) { }
1145 4 4 if (grep /^\Q$to\E$/, @{$$self{'users'}{$$self{'nick'}}{'chats'};}) { }
1165 3 1 if (grep /^\Q$user\E$/, keys %{$$self{'users'};}) { }
1187 2 0 if (grep /^\Q$nick\E$/, @{$$self{'channels'}{$_}{'users'};})
1235 0 32 if ($buffer eq 'IPTEST') { }
0 32 elsif (not $buffer =~ /^\x58.{9}/) { }
1254 2 30 if ($pkttype eq '0')
1268 2 30 if ($pkttype eq '1') { }
1 29 elsif ($pkttype eq '2') { }
1 28 elsif ($pkttype eq '3') { }
2 26 elsif ($pkttype eq '4') { }
1 25 elsif ($pkttype eq '5') { }
1 24 elsif ($pkttype eq '6') { }
1 23 elsif ($pkttype eq 'E') { }
1 22 elsif ($pkttype eq '7') { }
1 21 elsif ($pkttype eq '8') { }
1 20 elsif ($pkttype eq '9') { }
1 19 elsif ($pkttype eq 'A') { }
1 18 elsif ($pkttype eq 'B') { }
0 18 elsif ($pkttype eq 'C') { }
4 14 elsif ($pkttype eq 'D') { }
1 13 elsif ($pkttype eq 'F') { }
2 11 elsif ($pkttype eq 'G') { }
1 10 elsif ($pkttype eq 'H') { }
1 9 elsif ($pkttype eq 'I') { }
5 4 elsif ($pkttype eq 'J') { }
0 4 elsif ($pkttype eq 'L') { }
0 4 elsif ($pkttype eq 'K') { }
2 2 elsif ($pkttype eq 'M') { }
1271 2 0 if ($updater eq $$self{'nick'} and $responder eq $$self{'nick'} || !$self->on_userlist($responder))
1284 0 2 unless $self->on_chan('#Main')
1298 1 0 if ($self->on_userlist($from))
1299 1 0 unless $text
1300 1 0 if ($chan and $from)
1301 1 0 if ($self->on_chan($$self{'nick'}, $chan))
1318 0 0 if ($ip ne $$self{'localip'} and $self->on_userlist($oldnick) and $oldnick ne $newnick)
1321 0 0 if ($oldnick eq $$self{'oldnick'}) { }
0 0 elsif ($newnick eq $$self{'nick'} and $$self{'coll_avoid'}) { }
1328 0 0 unless ($self->on_userlist("[$_]" . $nick))
1351 0 2 if ($ip ne $$self{'localip'})
1352 0 0 if ($$self{'last_joined_chan'} eq $chan) { }
0 0 elsif ($who eq $$self{'nick'}) { }
1359 0 0 unless ($self->on_userlist("[$_]" . $nick))
1365 0 0 if ($self->on_chan($chan))
1389 0 1 if ($who ne $$self{'nick'} and $self->on_chan($who, $chan))
1405 1 0 if ($self->on_userlist($from))
1406 1 0 unless $text
1407 1 0 if ($to eq $$self{'nick'})
1425 1 0 if ($self->on_userlist($from))
1426 1 0 unless $text
1428 1 0 if ($to eq $$self{'nick'})
1448 1 0 if ($to eq $$self{'nick'})
1465 1 0 unless $cmd
1466 1 0 unless $pass
1467 1 0 if ($to eq $$self{'nick'})
1484 1 0 unless $text
1485 1 0 if ($to eq $$self{'nick'})
1502 1 0 unless $text
1503 1 0 if ($chan and $fromwho)
1504 1 0 if ($self->on_chan($$self{'nick'}, $chan))
1524 1 0 if ($self->on_chan($$self{'nick'}, $chan))
1542 0 0 unless $topic
1544 0 0 if (not $$self{'channels'}{$chan}{'topic'} and $forwho eq $$self{'nick'}) { }
1575 0 4 if ($who ne $$self{'nick'})
1594 1 0 if ($forwho =~ /$$self{'nick'}/)
1596 0 1 if $$self{'send_info'}
1612 2 0 if ($forwho eq $$self{'nick'})
1644 0 1 if ($to eq $$self{'nick'})
1645 0 0 if ($pkttype eq '0') { }
0 0 elsif ($pkttype eq '1') { }
1666 1 0 unless $file
1667 1 0 if ($self->on_chan($$self{'nick'}, $chan))
1695 0 5 if ($to eq $$self{'nick'})
1696 0 0 if ($subtype eq '0') { }
0 0 elsif ($subtype eq '1') { }
0 0 elsif ($subtype eq '2') { }
0 0 elsif ($subtype eq '3') { }
1730 0 0 if ($self->on_chan($$self{'nick'}, $chan))
1747 0 0 if ($to eq $$self{'nick'})
1767 1 1 if ($active == 1) { }
1777 0 2 if $$self{'debug'} == 2