SMTP.pm, add missing ; and remove useless if
This commit is contained in:
parent
d9a42d1774
commit
d80a347afe
@ -54,20 +54,16 @@ sub dispatch {
|
||||
|
||||
if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
|
||||
$self->run_hooks("unrecognized_command", $cmd, @_);
|
||||
return 1
|
||||
return 1;
|
||||
}
|
||||
$cmd = $1;
|
||||
|
||||
if (1 or $self->{_commands}->{$cmd} and $self->can($cmd)) {
|
||||
my ($result) = eval { $self->$cmd(@_) };
|
||||
$self->log(LOGERROR, "XX: $@") if $@;
|
||||
return $result if defined $result;
|
||||
return $self->fault("command '$cmd' failed unexpectedly");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub unrecognized_command_respond {
|
||||
my ($self, $rc, $msg) = @_;
|
||||
if ($rc == DENY_DISCONNECT) {
|
||||
|
Loading…
Reference in New Issue
Block a user