Merge pull request #154 from jaredj/perltidy
perltidy -b lib/Qpsmtpd/Plugin.pm
This commit is contained in:
commit
664990b425
@ -164,7 +164,7 @@ sub isa_plugin {
|
|||||||
$self->compile($self->plugin_name . "_isa_$cleanParent",
|
$self->compile($self->plugin_name . "_isa_$cleanParent",
|
||||||
$newPackage, "$parent_dir/$parent");
|
$newPackage, "$parent_dir/$parent");
|
||||||
warn "---- $newPackage\n";
|
warn "---- $newPackage\n";
|
||||||
no strict 'refs'; ## no critic (strict)
|
no strict 'refs'; ## no critic (strict)
|
||||||
push @{"${currentPackage}::ISA"}, $newPackage;
|
push @{"${currentPackage}::ISA"}, $newPackage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ sub compile {
|
|||||||
$eval =~ m/(.*)/s;
|
$eval =~ m/(.*)/s;
|
||||||
$eval = $1;
|
$eval = $1;
|
||||||
|
|
||||||
eval $eval; ## no critic (Eval)
|
eval $eval; ## no critic (Eval)
|
||||||
die "eval $@" if $@;
|
die "eval $@" if $@;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,10 +272,10 @@ sub store_auth_results {
|
|||||||
my $auths = $self->qp->connection->notes('authentication_results') or do {
|
my $auths = $self->qp->connection->notes('authentication_results') or do {
|
||||||
$self->qp->connection->notes('authentication_results', $result);
|
$self->qp->connection->notes('authentication_results', $result);
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
my $ar = join('; ', $auths, $result);
|
my $ar = join('; ', $auths, $result);
|
||||||
$self->log(LOGDEBUG, "auth-results: $ar");
|
$self->log(LOGDEBUG, "auth-results: $ar");
|
||||||
$self->qp->connection->notes('authentication_results', $ar );
|
$self->qp->connection->notes('authentication_results', $ar);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub is_immune {
|
sub is_immune {
|
||||||
@ -306,9 +306,9 @@ sub is_naughty {
|
|||||||
my ($self, $setit) = @_;
|
my ($self, $setit) = @_;
|
||||||
|
|
||||||
# see plugins/naughty
|
# see plugins/naughty
|
||||||
return $self->connection->notes('naughty') if ! defined $setit;
|
return $self->connection->notes('naughty') if !defined $setit;
|
||||||
|
|
||||||
$self->connection->notes('naughty', $setit);
|
$self->connection->notes('naughty', $setit);
|
||||||
$self->connection->notes('rejected', $setit);
|
$self->connection->notes('rejected', $setit);
|
||||||
|
|
||||||
if ($self->connection->notes('naughty')) {
|
if ($self->connection->notes('naughty')) {
|
||||||
@ -342,7 +342,7 @@ sub _register_standard_hooks {
|
|||||||
my $hooksub = "hook_$hook";
|
my $hooksub = "hook_$hook";
|
||||||
$hooksub =~ s/\W/_/g;
|
$hooksub =~ s/\W/_/g;
|
||||||
next if !$plugin->can($hooksub);
|
next if !$plugin->can($hooksub);
|
||||||
$plugin->register_hook($hook, $hooksub)
|
$plugin->register_hook($hook, $hooksub);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user