leave register() if neither geoip module loads

This commit is contained in:
Jared Johnson 2014-11-07 15:58:12 -06:00
parent 7ba86cb5a2
commit 462e974d1e

View File

@ -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 {