diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-21 21:35:34 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:59 +0200 |
commit | b167dfd575095cd574560a054673b0d3e78d9966 (patch) | |
tree | 03595a6324788fcb4f908b62f53befb2da8d3fca /scripts | |
parent | c90322fffc1ecf062a8c48e8a1bc27077fa5dbc2 (diff) | |
download | bugzilla-b167dfd575095cd574560a054673b0d3e78d9966.tar.gz bugzilla-b167dfd575095cd574560a054673b0d3e78d9966.tar.xz |
port BlockIP to mojolicious
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/block-ip.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/block-ip.pl b/scripts/block-ip.pl index b767a1fd5..3fa66d336 100755 --- a/scripts/block-ip.pl +++ b/scripts/block-ip.pl @@ -12,8 +12,8 @@ use warnings; use lib qw(. lib local/lib/perl5); use Bugzilla; +use Bugzilla::Quantum; use Bugzilla::Constants; -use Bugzilla::ModPerl::BlockIP; use Getopt::Long; Bugzilla->usage_mode(USAGE_MODE_CMDLINE); @@ -23,10 +23,12 @@ GetOptions('unblock' => \$unblock); pod2usage("No IPs given") unless @ARGV; +my $app = Bugzilla::Quantum->new; + if ($unblock) { - Bugzilla::ModPerl::BlockIP->unblock_ip($_) for @ARGV; + $app->unblock_ip($_) for @ARGV; } else { - Bugzilla::ModPerl::BlockIP->block_ip($_) for @ARGV; + $app->block_ip($_) for @ARGV; } =head1 NAME @@ -52,4 +54,4 @@ If passed, the IPs will be unblocked instead of blocked. Use this to remove IPs =head1 DESCRIPTION -This is just a simple CLI inteface to L<Bugzilla::ModPerl::BlockIP>. +This is just a simple CLI inteface to L<Bugzilla::Quantum::Plugin::BlockIP>. |