]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[scriptassist] update to 2020042200
authorAilin Nemui <redacted>
Wed, 22 Apr 2020 08:33:50 +0000 (10:33 +0200)
committerAilin Nemui <redacted>
Wed, 22 Apr 2020 08:33:50 +0000 (10:33 +0200)
- do not look up numbers if window_number_commands is on
- fix circular references in get_unknown
- restore comment of unfinished "depends" code

scripts/scriptassist.pl

index 9892156c8f3e630bbeaec58da65b600a59c78371..dd461ddbef8365a705b81f92fbcf53d779c843fd 100644 (file)
@@ -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);
 }
 
git clone https://git.99rst.org/PROJECT