]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Fixed to use ifconfig.co/ip instead of xergio.net because the server does not work...
authorAxel Gembe <redacted>
Wed, 8 Nov 2017 11:41:21 +0000 (18:41 +0700)
committerAxel Gembe <redacted>
Sat, 11 Nov 2017 08:35:30 +0000 (15:35 +0700)
scripts/ipupdate.pl

index 42fa31b1f73d7c4ef66a3d917c921558af1adebb..dc99c450158261cde2bc931cc1e6bc780dec85f2 100644 (file)
@@ -5,6 +5,9 @@
 # original create by legion (a.lepore@email.it)
 #
 # thanks xergio for IP show php script :>
+#
+# Fixed by Axel Gembe <derago@gmail.com> to use ifconfig.co/ip
+# because the original server did not work anymore.
 
 use strict;
 use Irssi;
@@ -12,22 +15,21 @@ use vars qw($VERSION %IRSSI);
 require LWP::UserAgent;
 use HTTP::Request::Common;
 
-$VERSION = '1.2';
+$VERSION = '1.3';
 %IRSSI = (
-               authors         => 'xlony',
+               authors         => 'xlony, Axel Gembe',
                contact         => 'anderfdez@yahoo.es',
                name            => 'IPupdate',
                description     => 'Auto "/set dcc_own_ip IP" on connect.',
                license         => 'GPL',
-               changed         => 'Tue Jan  3 18:33:56 CET 2006',
+               changed         => '2017-11-08',
 );
 
 sub ipset {
        my $user = LWP::UserAgent->new(timeout => 30);
-       my $get = GET "http://stuff.xergio.net/ip.php";
+       my $get = GET "http://ifconfig.co/ip";
        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;
 
        Irssi::print("%9IP update%_:", MSGLEVEL_CRAP);
        Irssi::command("set dcc_own_ip $out");
git clone https://git.99rst.org/PROJECT