summaryrefslogtreecommitdiffstats
path: root/scripts/hostname.pl
diff options
context:
space:
mode:
authorDavid Leadbeater2015-01-10 17:49:34 +0000
committerDavid Leadbeater2015-01-10 17:49:34 +0000
commit2d920d6f610e176bf121f9089f21956595df70e9 (patch)
tree287ac1dba07509317309acab3161f5da286958e9 /scripts/hostname.pl
parent1bae3cffef57d4d46d0230aa4f44cc52c7671b93 (diff)
parentd84f1e1808b3252af83e4963eccfd1e4f19c5326 (diff)
downloadscripts.irssi.org-2d920d6f610e176bf121f9089f21956595df70e9.tar.bz2
Merge branch 'perlcritic-e-l' of git://github.com/obfuscoder/scripts.irssi.org into obfuscoder-perlcritic-e-l
Conflicts: scripts/eng_no_translate_dpryo.pl
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.:]*)/