From: Ailin Nemui Date: Wed, 22 Apr 2020 08:33:50 +0000 (+0200) Subject: [scriptassist] update to 2020042200 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=3536ca7ae92a2eb7ab5bbd66459480b7a3811f25;p=irssi-scripts.irssi.org.git [scriptassist] update to 2020042200 - do not look up numbers if window_number_commands is on - fix circular references in get_unknown - restore comment of unfinished "depends" code --- diff --git a/scripts/scriptassist.pl b/scripts/scriptassist.pl index 9892156..dd461dd 100644 --- a/scripts/scriptassist.pl +++ b/scripts/scriptassist.pl @@ -5,7 +5,7 @@ use strict; -our $VERSION = '2003020807'; +our $VERSION = '2020042200'; our %IRSSI = ( authors => 'Stefan \'tommie\' Tomanek', contact => 'stefan@pico.ruhr.de', @@ -23,12 +23,15 @@ use Irssi 20020324; use CPAN::Meta::YAML; use LWP::UserAgent; use POSIX; +use version; # GnuPG is not always needed $have_gpg = 0; eval "use GnuPG qw(:algo :trust);"; $have_gpg = 1 if not ($@); +my $irssi_version = qv(Irssi::parse_special('v$J') =~ s/-.*//r); + sub show_help { my $help = "scriptassist $VERSION /scriptassist check @@ -1158,6 +1161,7 @@ sub sig_command_script_load { sub sig_default_command { my ($cmd, $server) = @_; return unless Irssi::settings_get_bool("scriptassist_check_unknown_commands"); + return if ($cmd =~ /^\d+$/ && $irssi_version >= v1.2.0 && Irssi::settings_get_bool("window_number_commands")); bg_do('unknown '.$cmd); }