From: Mattias Jernberg Date: Wed, 27 Jun 2018 17:10:40 +0000 (+0200) Subject: [nickserv] Add detection of Anope IRC Services X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=028a32c1e2f6f5b3fb81e54ef4b139e02dd24ec3;p=irssi-scripts.irssi.org.git [nickserv] Add detection of Anope IRC Services Anope has a slightly different message for the "If this is ..." line, modify the existing regex to also catch this message: "(If this is your nick, type /msg NickServ IDENTIFY password.)" --- diff --git a/scripts/nickserv.pl b/scripts/nickserv.pl index ff2738d..d9d0093 100644 --- a/scripts/nickserv.pl +++ b/scripts/nickserv.pl @@ -24,7 +24,7 @@ use strict; use Irssi; use vars qw($VERSION %IRSSI); -$VERSION = "1.11"; +$VERSION = "1.12"; %IRSSI = ( authors => 'Geert Hauwaerts', @@ -33,7 +33,7 @@ $VERSION = "1.11"; description => 'This script will authorize you into NickServ.', license => 'GNU General Public License', url => 'https://github.com/irssi/scripts.irssi.org/blob/master/scripts/nickserv.pl', - changed => 'Di 17. Jan 19:32:45 CET 2017', + changed => 'Wed Jun 27 19:23 CEST 2018', ); my $irssidir = Irssi::get_irssi_dir(); @@ -466,7 +466,7 @@ sub nickserv_notice { if (is_nickserv($server->{tag}, $address)) { $text =~ s/[[:cntrl:]]+//g; # remove control crap - if ($text =~ /^(?:If this is your nickname, type|Please identify via|Type) \/msg NickServ (?i:identify)/ || $text =~ /^This nickname is registered and protected. If it is your/ || $text =~ /This nickname is registered\. Please choose a different nickname/) { + if ($text =~ /^(?:\(?If this is your nick(?:name)?, type|Please identify via|Type) \/msg NickServ (?i:identify)/ || $text =~ /^This nickname is registered and protected. If it is your/ || $text =~ /This nickname is registered\. Please choose a different nickname/) { my $password = get_password($server->{tag}, $server->{nick}); if ($password == -1) {