ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/err.pl
(Generate patch)

Comparing Coro/myhttpd/err.pl (file contents):
Revision 1.9 by root, Fri Oct 12 12:34:31 2007 UTC vs.
Revision 1.10 by root, Sat Dec 8 21:01:13 2007 UTC

1use HTTP::Date; 1use HTTP::Date;
2 2
3use Coro::Event; 3use Coro::EV;
4 4
5sub conn::err_block_country { 5sub conn::err_block_country {
6 my $self = shift; 6 my $self = shift;
7 my $whois = shift; 7 my $whois = shift;
8 8
104 104
105 my $limit = $block->[3]; 105 my $limit = $block->[3];
106 $block->[3] = $::NOW + 10; 106 $block->[3] = $::NOW + 10;
107 107
108 if ($limit > $::NOW) { 108 if ($limit > $::NOW) {
109 Coro::Event::do_timer(after => $limit - $::NOW); 109 Coro::EV::timer_once $limit - $::NOW;
110 110
111 if ($block->[2] > 20) { 111 if ($block->[2] > 20) {
112 $block->[3] = $::NOW + $::DYNABLOCK + 360; 112 $block->[3] = $::NOW + $::DYNABLOCK + 360;
113 $status = 401; 113 $status = 401;
114 $hdr->{Warning} = "Please do NOT retry, your IP has been blocked due to excessive hammering. Press Cancel instead."; 114 $hdr->{Warning} = "Please do NOT retry, your IP has been blocked due to excessive hammering. Press Cancel instead.";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines