X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=net.pl;h=13d73eda0b32fe70f5f2f8fc36526f4fb41b0854;hb=73947ac5d6fffbe5b5ad7f86a9d57d5ada557e6b;hp=eefa83c79fc59432c4049c5c3af719cda2b31021;hpb=263b6777b90548951a13bd56419fa911b010eb9b;p=perl%2Fscripts%2Fxchat.git diff --git a/net.pl b/net.pl index eefa83c..13d73ed 100755 --- a/net.pl +++ b/net.pl @@ -3,14 +3,14 @@ package Xchat::VPIT::Net; use strict; use warnings; -use List::Util qw/max/; -use Locale::Country qw/code2country/; +use List::Util qw; +use Locale::Country qw; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; -use Xchat::XPI::Net qw/resolve whois/; +use Xchat::XPI::Net qw; our $VERSION = '0.02'; @@ -69,7 +69,7 @@ sub dig_print { } else { output '*', 'Resolution failed for ' . $req->{host}, map { - $_->mname . ' IN SOA ' . $_->rname . "\n", + $_->mname . ' IN SOA ' . $_->rname . "\n", join ' ', 'serial:' . $_->serial, 'ref:' . $_->refresh, 'ret:' . $_->retry, 'exp:' . $_->expire, 'min:' . $_->minimum . "\n"; @@ -90,8 +90,8 @@ hook_command 'NETWHOIS', sub { my $info = user_info $_; my $req = parse_url($info ? $info->{host} : $_); whois $req->{host}, \&netwhois_print, [ $context, $req ]; - } - return EAT_ALL; + } + return EAT_ALL; }, { help_text => 'NETWHOIS , retrieve domain/ip information' }; @@ -126,17 +126,19 @@ hook_command 'TLD', sub { next unless $tld; my $name = code2country $tld; print $ph $tld . ' is ' . ($name ? $name : 'unknown') . "\n"; - } + } return EAT_ALL; }, { help_text => 'TLD , give the TLD text representation of the hosts' }; -$ph = new Xchat::XPI name => 'Networking tools', - tag => 'Net', - desc => 'DNS & Whois clients, TLD names', - author => 'Vincent Pit (VPIT)', - email => 'perl@profvince.com', - url => 'http://www.profvince.com'; +$ph = Xchat::XPI->new( + name => 'Networking tools', + tag => 'Net', + desc => 'DNS & Whois clients, TLD names', + author => 'Vincent Pit (VPIT)', + email => 'perl@profvince.com', + url => 'http://www.profvince.com', +); 1;