- if (defined $name) {
- if (grep { $name eq $_ } @{$config{banned_users}}) {
- print $q->header(-status => "403 Forbidden");
- $session->delete();
- print gettext("You are banned.");
- cgi_savesession($session);
- exit;
+ if (defined $name &&
+ grep { $name eq $_ } @{$config{banned_users}}) {
+ $banned=1;
+ }
+
+ foreach my $b (@{$config{banned_users}}) {
+ if (pagespec_match("", $b,
+ ip => $ENV{REMOTE_ADDR},
+ name => defined $name ? $name : "",
+ )) {
+ $banned=1;
+ last;