3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-25 04:02:37 +01:00

Correct logic of login command ignore check

This commit is contained in:
Pragmatic Software 2015-09-07 05:04:54 -07:00
parent 1582b35db9
commit d51d2367a1

View File

@ -127,8 +127,7 @@ sub process_line {
last if not defined $command and not defined $has_url and not defined $has_code; last if not defined $command and not defined $has_url and not defined $has_code;
if((defined $command && $command !~ /^login/i) || defined $has_url || defined $has_code) { if((!defined $command || $command !~ /^login/) && defined $from && $pbot->{ignorelist}->check_ignore($nick, $user, $host, $from)) {
if(defined $from && $pbot->{ignorelist}->check_ignore($nick, $user, $host, $from)) {
my $admin = $pbot->{admins}->loggedin($from, "$nick!$user\@$host"); my $admin = $pbot->{admins}->loggedin($from, "$nick!$user\@$host");
if (!defined $admin || $admin->{level} < 10) { if (!defined $admin || $admin->{level} < 10) {
# ignored hostmask # ignored hostmask
@ -154,7 +153,6 @@ sub process_line {
$self->handle_result($from, $nick, $user, $host, $text, $command, $self->interpret($from, $nick, $user, $host, 1, $command, undef, $referenced), 1, $preserve_whitespace); $self->handle_result($from, $nick, $user, $host, $text, $command, $self->interpret($from, $nick, $user, $host, 1, $command, undef, $referenced), 1, $preserve_whitespace);
} }
} }
}
} }
sub interpret { sub interpret {