… | |
… | |
10 | use Text::Abbrev; |
10 | use Text::Abbrev; |
11 | |
11 | |
12 | my $last_ts = time; |
12 | my $last_ts = time; |
13 | |
13 | |
14 | my %complete; |
14 | my %complete; |
15 | my @commands = qw(quit squit refresh country restart block info print clrdiridx); |
15 | my @commands = qw(quit squit refresh country clrwhois restart block info print clrdiridx); |
16 | |
16 | |
17 | abbrev \%complete, @commands; |
17 | abbrev \%complete, @commands; |
18 | |
18 | |
19 | sub shell { |
19 | sub 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 | } |