summaryrefslogtreecommitdiffstats
path: root/scripts/hostname.pl
diff options
context:
space:
mode:
authorDavid Leadbeater2015-01-10 17:50:12 +0000
committerDavid Leadbeater2015-01-10 17:50:12 +0000
commit3350aef6b04f0d33ad52b41179c6742a98d2aa1f (patch)
tree287ac1dba07509317309acab3161f5da286958e9 /scripts/hostname.pl
parent1bae3cffef57d4d46d0230aa4f44cc52c7671b93 (diff)
parent2d920d6f610e176bf121f9089f21956595df70e9 (diff)
downloadscripts.irssi.org-3350aef6b04f0d33ad52b41179c6742a98d2aa1f.tar.bz2
Merge branch 'obfuscoder-perlcritic-e-l' into gh-pages
Diffstat (limited to 'scripts/hostname.pl')
-rw-r--r--scripts/hostname.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/hostname.pl b/scripts/hostname.pl
index 8871aea..2dc23bf 100644
--- a/scripts/hostname.pl
+++ b/scripts/hostname.pl
@@ -1,6 +1,8 @@
# $Id: hostname.pl,v 1.8 2002/07/04 13:18:02 jylefort Exp $
+use strict;
use Irssi 20020121.2020 ();
+use vars qw($VERSION %IRSSI);
$VERSION = "1.01";
%IRSSI = (
authors => 'Jean-Yves Lefort',
@@ -96,7 +98,6 @@ $VERSION = "1.01";
#
# 2002-02-01 initial release
-use strict;
use Socket;
use Socket6;
@@ -116,7 +117,7 @@ sub hostname {
sub get_addresses {
Irssi::print("Resolving IP addresses...");
%addresses = ();
- open(IFCONFIG, "ifconfig|");
+ open(IFCONFIG, "-|", "ifconfig");
while (<IFCONFIG>) {
$addresses{$2} = resolve($2)
if (/(inet addr:|inet6 addr: |inet |inet6 )([0-9a-f.:]*)/