mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
AntiFlood: very, very minor clean-up
This commit is contained in:
parent
f358cd9c73
commit
b2a26100c0
@ -30,12 +30,8 @@ use Text::CSV;
|
|||||||
use Carp ();
|
use Carp ();
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
if (ref($_[1]) eq 'HASH') {
|
Carp::croak("Options to " . __FILE__ . " should be key/value pairs, not hash reference") if ref($_[1]) eq 'HASH';
|
||||||
Carp::croak("Options to " . __FILE__ . " should be key/value pairs, not hash reference");
|
|
||||||
}
|
|
||||||
|
|
||||||
my ($class, %conf) = @_;
|
my ($class, %conf) = @_;
|
||||||
|
|
||||||
my $self = bless {}, $class;
|
my $self = bless {}, $class;
|
||||||
$self->initialize(%conf);
|
$self->initialize(%conf);
|
||||||
return $self;
|
return $self;
|
||||||
@ -43,7 +39,6 @@ sub new {
|
|||||||
|
|
||||||
sub initialize {
|
sub initialize {
|
||||||
my ($self, %conf) = @_;
|
my ($self, %conf) = @_;
|
||||||
|
|
||||||
$self->{pbot} = delete $conf{pbot} // Carp::croak("Missing pbot reference to " . __FILE__);
|
$self->{pbot} = delete $conf{pbot} // Carp::croak("Missing pbot reference to " . __FILE__);
|
||||||
|
|
||||||
# flags for 'validated' field
|
# flags for 'validated' field
|
||||||
|
Loading…
Reference in New Issue
Block a user