Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  1 Jul 2010 11:58:29 +0200 (CEST)
From:      freebsd@nagilum.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        karma@ez.pereslavl.ru
Subject:   ports/148280: irc/irssi-scripts / ipupdate.pl not working
Message-ID:  <20100701095829.B78A06788B@cakebox.homeunix.net>
Resent-Message-ID: <201007011000.o61A0JHf033608@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         148280
>Category:       ports
>Synopsis:       irc/irssi-scripts / ipupdate.pl not working
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 01 10:00:19 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     freebsd@nagilum.org
>Release:        FreeBSD 8.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD cakebox.tis 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Tue Jun 29 22:25:46 CEST 2010 root@cakebox.tis:/usr/obj/export/src/sys/net5501 i386


	irssi-scripts are machine independant
>Description:
	The URL used to determine the external IP (http://stuff.xergio.net/ip.php)  is no longer working.
>How-To-Repeat:
	start irssi then "/run /usr/local/share/irssi/scripts/ipupdate.pl"
>Fix:

	Apply attached patch to the irssi-scripts port which introduces a patch that replaces the old URL with http://checkip.dyndns.com/  and adjusts the regexp to match properly.

--- irssi-scripts.patch begins here ---
diff -Naur irssi-scripts.orig/files/patch-scripts__ipupdate.pl irssi-scripts/files/patch-scripts__ipupdate.pl
--- irssi-scripts.orig/files/patch-scripts__ipupdate.pl	1970-01-01 01:00:00.000000000 +0100
+++ irssi-scripts/files/patch-scripts__ipupdate.pl	2010-06-26 20:28:57.000000000 +0200
@@ -0,0 +1,15 @@
+--- scripts/ipupdate.pl	2010-05-12 09:09:48.000000000 +0200
++++ scripts/ipupdate.pl	2009-08-24 15:33:20.000000000 +0200
+@@ -24,10 +24,10 @@
+ 
+ sub ipset {
+ 	my $user = LWP::UserAgent->new(timeout => 30);
+-	my $get = GET "http://stuff.xergio.net/ip.php";
++	my $get = GET "http://checkip.dyndns.com/";
+ 	my $req = $user->request($get);
+ 	my $out = $req->content();
+-	$out =~ s/.*IP real: ([0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?).*/$1/s;
++	$out =~ s/.*IP Address: ([0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?).*/$1/s;
+ 
+ 	Irssi::print("%9IP update%_:", MSGLEVEL_CRAP);
+ 	Irssi::command("set dcc_own_ip $out");
--- irssi-scripts.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100701095829.B78A06788B>