From 0a843adb1070627bb272cb326d9120fec56c0ded Mon Sep 17 00:00:00 2001 From: Pablo Martín Báez Echevarría Date: Sun, 28 Sep 2014 15:58:07 -0300 Subject: Fix u.pl --- scripts/u.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/u.pl b/scripts/u.pl index a552da7..c5313ab 100644 --- a/scripts/u.pl +++ b/scripts/u.pl @@ -12,7 +12,6 @@ $VERSION = "1.2"; changed => "Thu Jun 3 11:04:27 CEST 2004", ); - sub cmd_u { my ($data, $server, $channel) = @_; @@ -21,12 +20,18 @@ sub cmd_u my $msg; my $match; my $nick; - + if ($channel->{type} ne "CHANNEL") { Irssi::print("You are not on a channel"); return; } + + eval { /$data/ } ; + if ($@) { + Irssi::print("Not a valid regexp given.",MSGLEVEL_CLIENTERROR); + return; + } @nicks = $channel->nicks(); @@ -60,7 +65,7 @@ sub cmd_u } $match = $nick->{nick}.'!'.$nick->{host}; # For regexp matching - + $channel->print($msg) if $match =~ /$data/i; } -- cgit v1.2.3 From f3a3a6e9a9264f2a5e4a9cfe4e529f01441e9ef1 Mon Sep 17 00:00:00 2001 From: Pablo Martín Báez Echevarría Date: Mon, 13 Oct 2014 12:39:46 -0200 Subject: Update version number in the script and the yaml file --- _data/scripts.yaml | 2 +- scripts/u.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/scripts.yaml b/_data/scripts.yaml index 7d9ba96..e5d6a3e 100644 --- a/_data/scripts.yaml +++ b/_data/scripts.yaml @@ -3812,7 +3812,7 @@ license: "GNU GPL" name: "List nicks in channel" url: "http://otoria.freecode.nl/~michiel/u.pl" - version: "1.2" + version: "1.3" - authors: "Peder Stray" contact: "peder@ninja.no" diff --git a/scripts/u.pl b/scripts/u.pl index c5313ab..e785c76 100644 --- a/scripts/u.pl +++ b/scripts/u.pl @@ -1,7 +1,7 @@ use vars qw($VERSION %IRSSI); use Irssi 20020120; -$VERSION = "1.2"; +$VERSION = "1.3"; %IRSSI = ( authors => "Michiel", contact => "michiel\@dotgeek.org", -- cgit v1.2.3