]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
hide "hidden" scripts from scriptassist search
authorAilin Nemui <redacted>
Thu, 1 Feb 2018 15:29:26 +0000 (16:29 +0100)
committerAilin Nemui <redacted>
Thu, 1 Feb 2018 15:40:33 +0000 (16:40 +0100)
scripts/scriptassist.pl

index 459d97f6365f3755fba1e71897a46521387041aa..cf397e91acf6f57cc61e544e8017e0c21df01150 100644 (file)
@@ -5,7 +5,7 @@
 
 use strict;
 
-our $VERSION = '2003020804';
+our $VERSION = '2003020805';
 our %IRSSI = (
     authors     => 'Stefan \'tommie\' Tomanek',
     contact     => 'stefan@pico.ruhr.de',
@@ -315,6 +315,7 @@ sub get_new {
     my $xml = get_scripts();
     foreach (sort {$xml->{$b}{last_modified} cmp $xml->{$a}{last_modified}} keys %$xml) {
        my %entry = %{ $xml->{$_} };
+       next if $entry{HIDDEN};
        $result->{$_} = \%entry;
        $num--;
        last unless $num;
@@ -390,6 +391,7 @@ sub search_scripts {
     my %result;
     foreach (sort keys %{$database}) {
        my %entry = %{$database->{$_}};
+       next if $entry{HIDDEN};
        my $string = $_." ";
        $string .= $entry{description} if defined $entry{description};
        if ($string =~ /$query/i) {
git clone https://git.99rst.org/PROJECT