summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-21 21:35:34 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-28 22:41:59 +0200
commitb167dfd575095cd574560a054673b0d3e78d9966 (patch)
tree03595a6324788fcb4f908b62f53befb2da8d3fca /scripts
parentc90322fffc1ecf062a8c48e8a1bc27077fa5dbc2 (diff)
downloadbugzilla-b167dfd575095cd574560a054673b0d3e78d9966.tar.gz
bugzilla-b167dfd575095cd574560a054673b0d3e78d9966.tar.xz
port BlockIP to mojolicious
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/block-ip.pl10
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>.