Branch Coverage

blib/lib/Bot/BasicBot/Pluggable/Module/Auth.pm
Criterion Covered Total %
branch 37 44 84.0


line true false branch
37 0 18 unless $body and length $body > 4
40 1 17 unless $body =~ /^!/
47 13 4 if defined $params
50 0 17 unless exists $self->{'_admin_commands'}{$command}
60 3 14 if (scalar @params != $want_params)
65 1 13 unless $mess->{'address'}
69 0 13 unless not defined $mess->{'channel'} or $mess->{'channel'} eq 'msg'
71 7 6 if ($command eq 'auth') { }
2 4 elsif ($command eq 'adduser') { }
2 2 elsif ($command eq 'deluser') { }
1 1 elsif ($command eq 'password') { }
1 0 elsif ($command eq 'users') { }
75 4 3 if (_check_password($pass, $stored)) { }
78 1 3 if ($user eq 'admin' and $pass eq 'julia')
90 1 1 if ($self->authed($mess->{'who'})) { }
99 1 1 if ($self->authed($mess->{'who'})) { }
108 1 0 if ($self->authed($mess->{'who'})) { }
110 1 0 if (_check_password($old_pass, $self->get("password_$username"))) { }
124 1 0 $user =~ s/^password_// ? :
136 6 6 if $self->{'auth'}{$username}{'time'} and $self->{'auth'}{$username}{'time'} + 7200 > time
145 1 7 unless defined $entered_pw and defined $stored_pw
146 5 2 if ($stored_pw =~ /^\{SSHA\}/) { }