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

Comparing Coro/myhttpd/shell.pl (file contents):
Revision 1.24 by root, Wed Nov 19 11:41:06 2008 UTC vs.
Revision 1.25 by root, Sat Jan 23 21:27:51 2010 UTC

10use Text::Abbrev; 10use Text::Abbrev;
11 11
12my $last_ts = time; 12my $last_ts = time;
13 13
14my %complete; 14my %complete;
15my @commands = qw(quit squit refresh country restart block info print clrdiridx); 15my @commands = qw(quit squit refresh country clrwhois restart block info print clrdiridx);
16 16
17abbrev \%complete, @commands; 17abbrev \%complete, @commands;
18 18
19sub shell { 19sub shell {
20 my $fh = shift; 20 my $fh = shift;
65 EV::unloop; 65 EV::unloop;
66 print $fh "restarting, cu!\n"; 66 print $fh "restarting, cu!\n";
67 last; 67 last;
68 } elsif ($cmd eq "country") { 68 } elsif ($cmd eq "country") {
69 print $fh netgeo::ip_request($_), "\n"; 69 print $fh netgeo::ip_request($_), "\n";
70 } elsif ($cmd eq "clrwhois") {
71 netgeo::clear_cache;
70 } 72 }
71 } else { 73 } else {
72 print $fh "try one of @commands\n"; 74 print $fh "try one of @commands\n";
73 } 75 }
74 } 76 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines