leave register() if neither geoip module loads
This commit is contained in:
parent
7ba86cb5a2
commit
462e974d1e
@ -129,8 +129,12 @@ sub register {
|
||||
$self->{_args} = {@args};
|
||||
$self->{_args}{db_dir} ||= '/usr/local/share/GeoIP';
|
||||
|
||||
$self->load_geoip2() and return;
|
||||
$self->load_geoip1();
|
||||
$self->load_geoip() or return;
|
||||
}
|
||||
|
||||
sub load_geoip {
|
||||
$self->load_geoip2() and return 1;
|
||||
$self->load_geoip1() and return 1;
|
||||
}
|
||||
|
||||
sub load_geoip1 {
|
||||
@ -152,6 +156,7 @@ sub load_geoip1 {
|
||||
$self->init_my_country_code();
|
||||
|
||||
$self->register_hook('connect', 'geoip_lookup');
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub load_geoip2 {
|
||||
|
Loading…
Reference in New Issue
Block a user